Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.popen with mode "rb" fails on Unix #38160

Closed
isonno mannequin opened this issue Mar 13, 2003 · 3 comments
Closed

os.popen with mode "rb" fails on Unix #38160

isonno mannequin opened this issue Mar 13, 2003 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@isonno
Copy link
Mannequin

isonno mannequin commented Mar 13, 2003

BPO 703198
Nosy @loewis, @gaul

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2003-10-31.10:02:57.000>
created_at = <Date 2003-03-13.20:35:37.000>
labels = ['library']
title = 'os.popen with mode "rb" fails on Unix'
updated_at = <Date 2003-10-31.10:02:57.000>
user = 'https://bugs.python.org/isonno'

bugs.python.org fields:

activity = <Date 2003-10-31.10:02:57.000>
actor = 'loewis'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2003-03-13.20:35:37.000>
creator = 'isonno'
dependencies = []
files = []
hgrepos = []
issue_num = 703198
keywords = []
message_count = 3.0
messages = ['15123', '15124', '15125']
nosy_count = 3.0
nosy_names = ['loewis', 'gaul', 'isonno']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue703198'
versions = []

@isonno
Copy link
Mannequin Author

isonno mannequin commented Mar 13, 2003

On Windows, it's necessary to use the mode "rb" to
open a binary stream to a process. On Unix the "b"
modifier isn't necessary, but supplying it causes the
popen call to fail with

OSError: [Errno 22] Invalid argument

The Unix version of popen should accept and simply
ignore the "b" modifier to the mode, rather than fail.
That way the same code can run on both platforms
without modification or extra code to special case an
OS that may need the "b" modifier.

@isonno isonno mannequin closed this as completed Mar 13, 2003
@isonno isonno mannequin added the stdlib Python modules in the Lib dir label Mar 13, 2003
@isonno isonno mannequin closed this as completed Mar 13, 2003
@isonno isonno mannequin added the stdlib Python modules in the Lib dir label Mar 13, 2003
@gaul
Copy link
Mannequin

gaul mannequin commented Aug 22, 2003

Logged In: YES
user_id=139865

See patch 788404 for a fix.

@loewis
Copy link
Mannequin

loewis mannequin commented Oct 31, 2003

Logged In: YES
user_id=21627

Fixed with said patch.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

0 participants