Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
572ba0e3
Commit
572ba0e3
authored
Jul 07, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Boolean values for the capturestderr flag.
parent
58190047
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/popen2.py
Lib/popen2.py
+3
-3
No files found.
Lib/popen2.py
View file @
572ba0e3
...
...
@@ -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'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment