[pypy-svn] r72975 - pypy/trunk/pypy/tool
getxsick at codespeak.net
getxsick at codespeak.net
Sat Mar 27 21:28:35 CET 2010
Author: getxsick
Date: Sat Mar 27 21:28:26 2010
New Revision: 72975
Modified:
pypy/trunk/pypy/tool/runsubprocess.py
Log:
replace deprecated popen2() by Popen()
Modified: pypy/trunk/pypy/tool/runsubprocess.py
==============================================================================
--- pypy/trunk/pypy/tool/runsubprocess.py (original)
+++ pypy/trunk/pypy/tool/runsubprocess.py Sat Mar 27 21:28:26 2010
@@ -44,8 +44,9 @@
# do this at import-time, when the process is still tiny
_source = os.path.dirname(os.path.abspath(__file__))
_source = os.path.join(_source, 'runsubprocess.py') # and not e.g. '.pyc'
- _child_stdin, _child_stdout = os.popen2(
- "'%s' '%s'" % (sys.executable, _source))
+ args = ["'%s' '%s'" % (sys.executable, _source)]
+ pipe = Popen(args, stdout=PIPE, stdin=PIPE, shell=True, close_fds=True)
+ (_child_stdin, _child_stdout) = (pipe.stdin, pipe.stdout)
def _run(*args):
_child_stdin.write('%r\n' % (args,))
More information about the Pypy-commit
mailing list