Reputation: 339
I am running a shell command from within my python script using
os.system("some shell command")
This command essentially terminates a tool. I need to check that this tool is terminated in my script.
But as soon as the tool is terminated the script is terminated too!
Upvotes: 0
Views: 164
Reputation: 9584
Your script is probably terminating correctly. Try adding the following line after your last line of code to illustrate to you that it is done.
raw_input('Press any key to exit.')
Upvotes: 1
Reputation: 2825
Is the script, by any chance, launched by that same tool? If yes, you need to run os.setsid() to stop being dependent on it.
Upvotes: 1