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.

Author Tommy.Carstensen
Recipients Tommy.Carstensen, josh.r
Date 2014-03-24.22:32:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1395700324.36.0.37256032312.issue20992@psf.upfronthosting.co.za>
In-reply-to
Content
I read the fileinput code and realized how heavily tied it is to line input.

Will reading individual bytes as suggested not be very memory intensive, if each line is billions of characters?

    def bytefileinput():
        return (bytes((b,)) for line in fileinput.input() for b in line)

I posted my workaround on stackoverflow (see link earlier in tread), which does not make use of the fileinput module at all. After having read through the fileinput code I agree that the module should only support reading lines and this enhancement request should be closed.
History
Date User Action Args
2014-03-24 22:32:04Tommy.Carstensensetrecipients: + Tommy.Carstensen, josh.r
2014-03-24 22:32:04Tommy.Carstensensetmessageid: <1395700324.36.0.37256032312.issue20992@psf.upfronthosting.co.za>
2014-03-24 22:32:04Tommy.Carstensenlinkissue20992 messages
2014-03-24 22:32:04Tommy.Carstensencreate