我設置了一個程序,我的電腦連接到我們學校的代理,目前有這樣的事情:在linux上的python中的'導出'的子進程模塊錯誤?
import subprocess
import sys
username = 'fergus.barker'
password = '*************'
proxy = 'proxy.det.nsw.edu.au:8080'
options = '%s:%[email protected]%s' % (username, password, proxy)
subprocess.Popen('export http_proxy=' + options)
但是一旦運行,我得到:
Traceback (most recent call last):
File "school_proxy_settings.py", line 19, in <module>
subprocess.Popen('export http_proxy=' + options)
File "/usr/lib/python2.6/subprocess.py", line 621, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
這是怎麼回事,請人?