[Python-bugs-list] [ python-Bugs-788035 ] missing universal newline support in os.popen & friends

SourceForge.net noreply at sourceforge.net
Wed Aug 13 07:17:11 EDT 2003


Bugs item #788035, was opened at 2003-08-13 15:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=788035&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Torsten Marek (shlomme)
Assigned to: Nobody/Anonymous (nobody)
Summary: missing universal newline support in os.popen & friends

Initial Comment:
In contrast to the documentation, os.popen and relatives do not 
support the "U" format character in their constructors.

os.popen("some_nifty_command some_arg", "rU")
throws
OSError: [Errno 22] Invalid argument ,
while os.popen{2,3,4} just ignores "U".
I noticed that behaviour while p-opening oggenc (the ogg vorbis 
encoder), which uses curses for output. The lines end with \r and not 
with \n (due to some ncurses internals, I suspect), so that the file 
objects readline() function cannot split the output.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=788035&group_id=5470



More information about the Python-bugs-list mailing list