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 | ncogh...@gmail.com | Brisbane, Australia --------------------------------------------------------------- _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com