is there a way to call an external program inside python and don\'t wait for its execution to finish?
I tried this, but no luck:
os.system(\"external
Forget about os.system()
. It is deprecated in favour of the subprocess module.
It provides a way to execute subprograms for almost every thinkable use case.
Yes, use the subprocess module. For example:
p = subprocess.Popen(['external_program', 'arg1', 'arg2'])
# Process is now running in the background, do other stuff...
...
# Check if process has completed
if p.poll() is not None:
...
...
# Wait for process to complete
p.wait()