creo wrote: > i invoke an 'ls' command like this > commands.ls() > where commands.py is a file in the same directory > > what i want to do is > commands.VARIABLE() > where VARIABLE holds the name of the function which i want to execute > and depends on what the user has typed
You want getattr(commands, VARIABLE)() Peter -- http://mail.python.org/mailman/listinfo/python-list