How to create a exe launcher using python in windows
i need to launch a exe using a python script but also I need to kill it using the same script
A start idea is:
process = magicCommand( 'theExe.exe' ) #invoke exe
kill = 'no'
while kill == 'no':
kill = raw_input()
otherMagicCommand( process ) #kill
EDIT
this works in windows for m开发者_运维技巧e
process = subprocess.Popen( 'theExe.exe' ) #invoke exe
kill = 'no'
while kill == 'no':
kill = raw_input()
process.kill() #kill
Python subprocess module and some good examples and explanation
精彩评论