Hello,

is there a way to append a string that represents a function to a
module and then evaluate the whole thing? i got a python importer
class that sets the pythonPath for the specified script and returns
the name of the module like so.

myscript = sourceScript.importPath("Z:/python/myScript.py")

Now if i call myScript.saySomething() by hand it can execute the
function in myScript. The problem is: i have an array representing all
the functions that i want to map to a menu like so: functionArray =
(['saySomething()','saySomethingElse()']) . is there a way to cast a
string to a function like

myscript.(castToFunctionType)functionArray[0]

similar to str(3)?

thanks...

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to