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
20af3172
Commit
20af3172
authored
Sep 28, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
popen4(): Added for Unix.
Fixed a typo in a docstring.
parent
d75e63a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Lib/os.py
Lib/os.py
+7
-3
No files found.
Lib/os.py
View file @
20af3172
...
...
@@ -317,7 +317,7 @@ else:
def
getenv
(
key
,
default
=
None
):
"""Get an environment variable, return None if it doesn't exist.
The optional second argument can specify an alternat
iv
e default."""
The optional second argument can specify an alternate default."""
return
environ
.
get
(
key
,
default
)
def
_exists
(
name
):
...
...
@@ -458,14 +458,18 @@ otherwise return -SIG, where SIG is the signal that killed it. """
if
_exists
(
"fork"
):
if
not
_exists
(
"popen2"
):
def
popen2
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
assert
mode
[:
1
]
in
(
"b"
,
"t"
)
import
popen2
stdout
,
stdin
=
popen2
.
popen2
(
cmd
,
bufsize
)
return
stdin
,
stdout
if
not
_exists
(
"popen3"
):
def
popen3
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
assert
mode
[:
1
]
in
(
"b"
,
"t"
)
import
popen2
stdout
,
stdin
,
stderr
=
popen2
.
popen3
(
cmd
,
bufsize
)
return
stdin
,
stdout
,
stderr
if
not
_exists
(
"popen4"
):
def
popen4
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
import
popen2
stdout
,
stdin
=
popen2
.
popen4
(
cmd
,
bufsize
)
return
stdin
,
stdout
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