Reading external files or internal data
I have a class that reads most common files (text, images, tar
archives, zip archives). I just read in the whole thing and decide
then what to do with it - create a gtk.TextView, gdk.pixbuf, or
tables-of-contents, whatever. Looking at the functions in the
appropriate modules shows that most of them want to read from external
files. Some take file-like objects, others don't. And tarfile allows
it for gzip compressed archives, but not for bzip2 compressed ones.
This is not only horribly inconsistent, it's also ugly. I do not want
to read an external file over and over again. (If I'd read from
standard input, I'd have to create a temporary file - yuck!) I want to
deal just *once* with all the errors that can occur while reading the
What am I missing?
|All times are GMT. The time now is 06:17 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.