我想创建一个运行 PyPy 的进程。我尝试了以下方法并且有效:
import os
os.chdir('<path-to-pypy-download>/bin/')
os.execl('pypy', 'pypy', '-c', 'print "Hi!"')
但是,当我删除chdir
as 时:
import os
os.execl('<path-to-pypy-download>/bin/pypy', 'pypy', '-c', 'print "Hi!"')
我得到:
debug: WARNING: Library path not found, using compiled-in sys.path.
debug: WARNING: 'sys.prefix' will not be set.
debug: WARNING: Make sure the pypy binary is kept inside its tree of files.
debug: WARNING: It is ok to create a symlink to it from somewhere else.
debug: OperationError:
debug: operror-type: ImportError
debug: operror-value: No module named os
请问,有谁知道如何在不更改工作目录的情况下生成 PyPy 进程?