w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
command line args in subprocess.call while executing a python script

You should specify command line argument as separated items:

subprocess.call(['./myScript.py', 'args'])

NOTE if your myScript.py runs long, that could cause UI hang because subprocess.call wait the process to terminate. Consider using subprocess.Popen that does not wait the termination.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.