I\'m writing a Python application that takes as a command as an argument, for example:
$ python myapp.py command1
I want the application to
You can use exec:
exec("import myapp.commands.%s" % command)