This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.popen with mode "rb" fails on Unix
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gaul, isonno, loewis
Priority: normal Keywords:

Created on 2003-03-13 20:35 by isonno, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Messages (3)
msg15123 - (view) Author: J. Peterson (isonno) Date: 2003-03-13 20:35
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.

msg15124 - (view) Author: Andrew Gaul (gaul) Date: 2003-08-22 08:47
Logged In: YES 
user_id=139865

See patch 788404 for a fix.
msg15125 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-10-31 10:02
Logged In: YES 
user_id=21627

Fixed with said patch.
History
Date User Action Args
2022-04-10 16:07:38adminsetgithub: 38160
2003-03-13 20:35:37isonnocreate