" It has been my experience that, more often than not, any time you think you want to evaluate strings, you don't need to.
For instance, instead of passing around the name of the function as a string: s = "someFunction" eval(s)() you can pass around the function as an object: s = someFunction # note the lack of brackets s() -- Steven. " I want to read a module name and a function in that module from a ini-file and then run the function with some arguments also read from the ini-file. Is there a way to do this, still avoiding the eval()-method? example: module = modelParser.getModule() function = modelParser.getFunc() parms = modelParser.getParms() (modelParser just extracts string from the ini-file) I now have 'module' and 'function' as strings and 'parms' normally as a list of strings. I can import the module by __import__(module) but is there another way to call: module.function(parms) than using eval()? Thanks for any suggestions, Best Cesar
-- http://mail.python.org/mailman/listinfo/python-list