Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #__author__:: john kesh mahugu johnmahugu at gmail
- # running an external program (executable) with parameter with python
- program = 'myprogramname.exe'
- arguments = ('safe', 'normal', 'debug')
- argument = raw_input('Enter your argument: ')
- if argument in arguments:
- subprocess.call([program, argument])
- else:
- print('Illegal Argument')
- '''
- Hi I am trying to automate a command line program.
- The exe file take one argument to run.
- Example myprogramname.exe (say mode options are safe, normal or debug)
- to run in debug mode I simply type this in the command line:
- C:\source>myprogramname debug
- How do I write python program to run this ztac.exe file taking the different modes as inputs?
- '''#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement