1. Try os.popen: >>> import os >>> os.popen('echo Hello World').read() 'Hello World\n'
2. Try a test environment built for testing shell commands, such as DejaGnu: http://www.gnu.org/software/dejagnu/ -- http://mail.python.org/mailman/listinfo/python-list