I have a Python script that needs to execute an external program, but for some reason fails.
If I have the following script:
import os;
os.system(\"C
Suppose we want to run your Django web server (in Linux) that there is space between your path (path='/home/
), so do the following:
import subprocess
args = ['{}/manage.py'.format('/home// '), 'runserver']
res = subprocess.Popen(args, stdout=subprocess.PIPE)
output, error_ = res.communicate()
if not error_:
print(output)
else:
print(error_)
[Note]:
chmod 755 -R <'yor path'>
manage.py
is exceutable: chmod +x manage.py