summaryrefslogtreecommitdiffstats
path: root/Lib/popen2.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-12-02 13:32:15 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-12-02 13:32:15 (GMT)
commit95b057e3ea98f78cad8cbee3c77640c11573b792 (patch)
treed1e726119df490a518eca20744e12519d38288ee /Lib/popen2.py
parent06f15bbcc42941e315aec086c4b238eb49cd25e3 (diff)
downloadcpython-95b057e3ea98f78cad8cbee3c77640c11573b792.zip
cpython-95b057e3ea98f78cad8cbee3c77640c11573b792.tar.gz
cpython-95b057e3ea98f78cad8cbee3c77640c11573b792.tar.bz2
Patch #487784: Support Unicode commands in popen3/4 handling on UNIX.
Diffstat (limited to 'Lib/popen2.py')
-rw-r--r--Lib/popen2.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/popen2.py b/Lib/popen2.py
index 8b1af76..14fe12f 100644
--- a/Lib/popen2.py
+++ b/Lib/popen2.py
@@ -8,6 +8,7 @@ and popen3(cmd) which return two or three pipes to the spawned command.
import os
import sys
+import types
__all__ = ["popen2", "popen3", "popen4"]
@@ -56,7 +57,7 @@ class Popen3:
_active.append(self)
def _run_child(self, cmd):
- if type(cmd) == type(''):
+ if isinstance(cmd, types.StringTypes):
cmd = ['/bin/sh', '-c', cmd]
for i in range(3, MAXFD):
try: