On my system, there is no crash but the code hangs indefinitely in the dir(pdb) call. Note that the PDB doesn't really exists until all the scripts and plugins have been registered, which isn't the case when your code runs.
In addition, the whole Gimp environment may not be complete at that point since Gimp itself is initializing.
What are you trying to achieve?
Edit: Changing the code to this:
to sneak a function inside the register() code elicits:
so obviously you can't expect complete Gimp functionality here.
In addition, the whole Gimp environment may not be complete at that point since Gimp itself is initializing.
What are you trying to achieve?
Edit: Changing the code to this:
Code:
def hook(name):
print "Running the hook..."
print dir(pdb)
return name
register(
hook(abc),
"",
"",
"Andrew Sears",
"Andrew Sears",
"2018",
to sneak a function inside the register() code elicits:
Quote:(process:14143): LibGimpBase-ERROR **: gimp_wire_write_msg: the wire protocol has not been initialized
so obviously you can't expect complete Gimp functionality here.