summaryrefslogtreecommitdiff
path: root/Lib/popen2.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2003-07-07 21:36:19 +0000
committerFred Drake <fdrake@acm.org>2003-07-07 21:36:19 +0000
commitb5aa407196b68b807c19cfecbdfc57cdb647de68 (patch)
treeea03cd1f8aefcde745be1fae7276f50a4df18cf9 /Lib/popen2.py
parent70fedcd583e1fe6ce2194691c546a0350f9a87fe (diff)
downloadcpython-git-b5aa407196b68b807c19cfecbdfc57cdb647de68.tar.gz
Use Boolean values for the capturestderr flag.
Diffstat (limited to 'Lib/popen2.py')
-rw-r--r--Lib/popen2.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/popen2.py b/Lib/popen2.py
index 8a176412f3..e8fff06e0b 100644
--- a/Lib/popen2.py
+++ b/Lib/popen2.py
@@ -25,7 +25,7 @@ class Popen3:
sts = -1 # Child not completed yet
- def __init__(self, cmd, capturestderr=0, bufsize=-1):
+ def __init__(self, cmd, capturestderr=False, bufsize=-1):
"""The parameter 'cmd' is the shell command to execute in a
sub-process. The 'capturestderr' flag, if true, specifies that
the object should capture standard error output of the child process.
@@ -141,14 +141,14 @@ else:
"""Execute the shell command 'cmd' in a sub-process. If 'bufsize' is
specified, it sets the buffer size for the I/O pipes. The file objects
(child_stdout, child_stdin) are returned."""
- inst = Popen3(cmd, 0, bufsize)
+ inst = Popen3(cmd, False, bufsize)
return inst.fromchild, inst.tochild
def popen3(cmd, bufsize=-1, mode='t'):
"""Execute the shell command 'cmd' in a sub-process. If 'bufsize' is
specified, it sets the buffer size for the I/O pipes. The file objects
(child_stdout, child_stdin, child_stderr) are returned."""
- inst = Popen3(cmd, 1, bufsize)
+ inst = Popen3(cmd, True, bufsize)
return inst.fromchild, inst.tochild, inst.childerr
def popen4(cmd, bufsize=-1, mode='t'):