I need to run a shell command asynchronously from a Python script. By this I mean that I want my Python script to continue running while the external command goes off and does whatever it needs to do.
I read this post:
http://stackoverflow.com/questions/89228/how-to-call-external-command-in-python
I then went off and did some testing, and it looks like os.system()
will do the job provided that I use &
at the end of the command so that I don't have to wait for it to return. What I am wondering is if this is the proper way to accomplish such a thing? I tried commands.call()
but it will not work for me because it blocks on the external command.
Please let me know if using os.system()
for this is advisable or if I should try some other route.