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 cjwelborn
Recipients cjwelborn, cool-RR, pitrou, serhiy.storchaka
Date 2014-01-23.20:37:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

It looks like Django has a File object that wraps around Python's built-in file object. It offers a 'mode' attribute, and a read(num_bytes=None) / write([content]) function. It also offers __iter__ functionality. You must open the file, and then wrap it with File() like:

myfile = File(open('myfile.txt', 'r'))


Looking at twisted.python.filepath.FilePath, it looks like there is no read/write.

These are two very popular frameworks/libraries, but I'll see if I can't find other sources for inspiration.

I think read_bytes/read_text would offer a good alternative method for reading files, instead of trying to create a full-on replacement like the previous patches attempt to do.
Date User Action Args
2014-01-23 20:37:25cjwelbornsetrecipients: + cjwelborn, pitrou, cool-RR, serhiy.storchaka
2014-01-23 20:37:24cjwelbornsetmessageid: <>
2014-01-23 20:37:24cjwelbornlinkissue20218 messages
2014-01-23 20:37:24cjwelborncreate