I\'m writing a command-line interface in Python. It uses the readline module to provide command history and completion.
While everything works fine in interactive mode,
Check out ScriptTest:
from scripttest import TestFileEnvironment env = TestFileEnvironment('./scratch') def test_script(): env.reset() result = env.run('do_awesome_thing testfile --with extra_win --file %s' % filename)
And play around with passing the arguments as you please.