extending file?

Peter Hansen peter at engcorp.com
Tue Nov 2 08:54:18 EST 2004


Chris Cioffi wrote:
> Are there any docs or examples of extending the file type?  I work
> with EDI messages that are very like text files, just with a few
> quirks. ;-)  and I was wondering if I could strech and twist the built
> in file type to make things a bit faster and more full featured.
> 
> Specifically I would need to alter the iterator and ideally the line terminitor.

It's unclear what you want to do.  Can you provide an example?

Also consider whether you can achieve what you want merely
by creating your own "file-like" object that wraps the
standard file type.  This is the usual way to proceed.

-Peter



More information about the Python-list mailing list