[Python-Dev] Ext4 data loss
Nick Coghlan
ncoghlan at gmail.com
Thu Mar 12 01:54:26 CET 2009
Greg Ewing wrote:
> Antoine Pitrou wrote:
>
>> What do you mean? open() doesn't allow you to wrap other file objects.
>
> I'm talking about things like GzipFile that take a
> filename and mode, open the file and then wrap the
> file object.
The tempfile module would be another example.
For that reason, I think Steven's idea of a filetools module which
provided context managers and the like that wrapped *existing* file-like
objects might be preferable.
Otherwise it may be a while before sync-aware code is able to deal with
anything other than basic files.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
More information about the Python-Dev
mailing list