Exec and Scope

Emanuele D'Arrigo manu3d at gmail.com
Fri Oct 31 15:10:23 EDT 2008


Ahh... before you guys reply: I found the way.

Between you James sounding the horn of alarm and you Rafe pointing me
in the right direction I sorted it out. Eventually I didn't end up
using getAttr but looking into it I learned the difference between

myResult = instance.method()

and

myMethod = instance.method

the latter can be passed as an object for execution inside a function,
i.e.:

def myCommand(inputMethod):
    inputMethod()

myCommand(myMethod)

and that works flawlessly! Thank you guys!

Manu



More information about the Python-list mailing list