On 20/05/06, <b class="gmail_sendername">Bruno Desthuilliers</b> <<a href="mailto:bdesth.quelquechose@free.quelquepart.fr">bdesth.quelquechose@free.quelquepart.fr</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Roger Miller a écrit :<br>> The basic problem is that the zipfile interface only reads and writes<br>> whole files, so it may perform poorly or fail on huge files.   At one<br>> time I implemented a patch to allow reading files in chunks. However I
<br>> believe that the current interface has too many problems to solve by<br>> incremental patching,<br><br>Yeps, that was the general tone of some thread on python-dev. And from<br>what I saw of the source code, it may effectively not be the cleanest
<br>part of the stdlib. But what, it does what it was written for at first :<br>provide working support for zipped packages.<br><br>> and that a zipfile2 module is probably warranted.<br>> (Is anyone working on this?)
<br><br>Seems like Bob Ippolito was on the rank, but I guess you'll get better<br>answers on python-dev.<br><br>> In the meantime I think the best solution is often to just run an<br>> external zip/unzip utility to do the heavy lifting.
<br><br>Indeed !-)<br><br>But while having zip/unzip installed OOTB on a unix-like system is close<br>to warrented, it may not be the case on Windows.<br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">
http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>Shame, I would like to try to improve this but seeing as Roger Miller
has already submitted a patch I don't know how much I can do for this.
In the end I resorted to using an external zip utility via os.system().<br><br>I'll be interested to know if there is any work
done on improving this as I'm in favour of native python usage, rather
than using os.system() and relying on the operating system having a zip
command, which I'm not convinced is the case on all windows machines,
and also, I'm sure gentoo installs don't have zip by default, since I
had to emerge it on a server for this script to work.
<br><br>Is it me or is having to use os.system() all the time
symtomatic of a deficiency/things which are missing from python as a
language? Not that I'm complaining, I'm just curious... I'm a
fledgeling programmer so I don't mind being gently corrected by any
veterans around.
<br><br>Hari<br>