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
The below piece worked for me:
>>>import imp; >>>fp, pathname, description = imp.find_module("/home/test_module"); >>>test_module = imp.load_module("test_module", fp, pathname, description); >>>print test_module.print_hello();
if you want to import in shell-script:
python -c ''