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.nullfilename
Type: enhancement Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: dtorp, jbelmonte, loewis, rhettinger
Priority: normal Keywords:

Created on 2004-04-15 20:44 by jbelmonte, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
os_devnull.patch jbelmonte, 2004-05-29 23:36 Patch which adds os.devnull
Messages (9)
msg54141 - (view) Author: John Belmonte (jbelmonte) * Date: 2004-04-15 20:44
Just as the os library provides os.sep, etc., for the
current OS, it should provide the name of the null file
(e.g., "/dev/null" or "nul:"), so that there is a
portable way to open a null file.

Use of an object such as

     class nullFile:
         def write(self, data):
             pass

is not sufficient because it does not provide a full
file object interface (no access to file descriptor, etc.).

See discussion at
<http://mail.python.org/pipermail/python-list/2004-March/213590.html>.
msg54142 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-04-15 20:52
Logged In: YES 
user_id=21627

Move to feature requests tracker
msg54143 - (view) Author: David Albert Torpey (dtorp) Date: 2004-05-09 01:54
Logged In: YES 
user_id=681258

I like this idea.  It is more portable.
msg54144 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-05-09 16:08
Logged In: YES 
user_id=21627

Would you like to work on a patch?
msg54145 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2004-05-21 06:00
Logged In: YES 
user_id=80475

Consider mentioning this on comp.lang.python.  Perhaps 
someone will volunteer to write a patch.
msg54146 - (view) Author: John Belmonte (jbelmonte) * Date: 2004-05-21 14:46
Logged In: YES 
user_id=282299

I do intend to make a patch, but it may be some time before I get to 
it.  Please give me a few weeks.  If someone else would like to step 
in, that is fine, just let me know before you start the work. 
 
msg54147 - (view) Author: John Belmonte (jbelmonte) * Date: 2004-05-29 23:36
Logged In: YES 
user_id=282299

Attaching patch against Python HEAD, including docs and test.
msg54148 - (view) Author: John Belmonte (jbelmonte) * Date: 2004-06-06 21:36
Logged In: YES 
user_id=282299

Please mark this as a patch and consider for commit.
msg54149 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-06-08 08:30
Logged In: YES 
user_id=21627

Thanks for the patch. Committed as

libos.tex 1.137
macpath.py 1.48
ntpath.py 1.59
os.py 1.77
os2emxpath.py 1.12
posixpath.py 1.66
test_os.py 1.24
NEWS 1.996
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40156
2004-04-15 20:44:04jbelmontecreate