【发布时间】:2012-12-27 04:23:39
【问题描述】:
我对编程还很陌生,因此决定设置一个简单的 python 脚本来打开我用于 webapp 开发的所有应用程序。我使用的代码是(用于 GAE):
google_appengine = r'C:\Applications\google_app_engine\launcher\GoogleAppEngineLauncher.exe'
subprocess.Popen(google_appengine)
这适用于我打开的其他程序,但是在我以这种方式打开 App Engine 后,我无法在 App Engine 中运行任何应用程序。我在 App Engine 日志文件中收到以下错误:
Exception in thread Thread-2:
Traceback (most recent call last):
File "threading.pyc", line 486, in __bootstrap_inner
File "launcher\taskthread.pyc", line 65, in run
File "subprocess.pyc", line 587, in __init__
File "subprocess.pyc", line 700, in _get_handles
File "subprocess.pyc", line 745, in _make_inheritable
WindowsError: [Error 6] The handle is invalid
我猜这是 subprocess.Popen() 的工作方式,但我无法找到任何替代方案。如果这有所作为,我正在运行 Windows 7。感谢观看。
【问题讨论】:
标签: python google-app-engine subprocess popen