summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-05-11 06:57:33 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-05-11 06:57:33 (GMT)
commit42dd86b8e2773c342ca7fa0ffcc9d1cbb8589bd3 (patch)
tree27d7ad013999378e92e4a94742831cd2081f5359 /Lib/plat-mac
parent82be218e971725657af9b3231a0c467e99ade26f (diff)
downloadcpython-42dd86b8e2773c342ca7fa0ffcc9d1cbb8589bd3.zip
cpython-42dd86b8e2773c342ca7fa0ffcc9d1cbb8589bd3.tar.gz
cpython-42dd86b8e2773c342ca7fa0ffcc9d1cbb8589bd3.tar.bz2
Deprecate os.popen* and popen2 module in favor of the subprocess module.
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r--Lib/plat-mac/pimp.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py
index 456427c..e58f36d 100644
--- a/Lib/plat-mac/pimp.py
+++ b/Lib/plat-mac/pimp.py
@@ -14,7 +14,7 @@ intention is that the end user will use this through a GUI.
"""
import sys
import os
-import popen2
+import subprocess
import urllib
import urllib2
import urlparse
@@ -101,10 +101,11 @@ def _cmd(output, dir, *cmditems):
output.write("+ %s\n" % cmd)
if NO_EXECUTE:
return 0
- child = popen2.Popen4(cmd)
- child.tochild.close()
+ child = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ child.stdin.close()
while 1:
- line = child.fromchild.readline()
+ line = child.stdout.readline()
if not line:
break
if output: