extending file?
Diez B. Roggisch
deetsNOSPAM at web.de
Tue Nov 2 08:32:31 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.
I'm not sure what you want to accomplish here - but one of the nicer aspects
of python is that you don't have to inherit from file when you want to pass
a file-like object to some lib. See the cStringIO module. So if you create
a edi-class that _behaves_ like a file, thats all you need - you then can
pass it to any file-accepting pieco of code.
Is that what you've been asking for?
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list