Michael Hoffman wrote:
> Peter Hansen wrote:
>
>> When files are opened through a "path" object -- e.g.
>> path('name').open() -- then file.name returns the path object that was
>> used to open it.
>
> Also works if you use file(path('name')) or open(path('name')).
Since that's exactly what the path module does, it's not surprising.
Practically everything that path does, with a few useful exceptions, is
a thin wrapper around the existing calls. path.open, for example is
merely this:
def open(self, mode='r'):
return file(self, mode)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list