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: two fileinput enhancements (fileno, openhook)
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, jjlee
Priority: normal Keywords: patch

Created on 2005-06-05 14:52 by georg.brandl, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fileinput-fileno.diff georg.brandl, 2005-06-05 14:52
fileinput-openhook.diff georg.brandl, 2005-12-08 13:22
Messages (5)
msg48440 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-06-05 14:52
These two patches enhance the fileinput module.

The fileno patch adds a "fileno()" method that returns
the current file number.

The openhook patch adds a possibility to specify an
opening hook, that is, instead of calling open(), the
hook is called. This is useful, for example, for
transparently decompressing gzip files, as wished in
RFE #563141.

Docs and tests will be added if this is welcomed.
msg48441 - (view) Author: John J Lee (jjlee) Date: 2005-12-04 17:01
Logged In: YES 
user_id=261020

I don't see any attached openhook patch.

The fileno patch looks fine, but personally I would indeed
welcome docs and tests :-)
msg48442 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-12-08 13:22
Logged In: YES 
user_id=1188172

Second patch attached, sorry ;)
msg48443 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-19 13:56
Logged In: YES 
user_id=1188172

Committed fileno patch in rev. 42493.
msg48444 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-19 14:58
Logged In: YES 
user_id=1188172

Committed (updated) openhook patch incl. docs and tests in
rev. 42495.
History
Date User Action Args
2022-04-11 14:56:11adminsetgithub: 42057
2005-06-05 14:52:08birkenfeldcreate