On Sun, May 31, 2009 at 2:42 PM, Brock <btibe...@gmail.com> wrote: > Hi all, > > I am new to python, so please don't attack me if this question is easy > or basic. How can I go about extracting the contents of a zip file to > the same directory? Can I extend this question to a zip file that > sits on the internet? > > Point being I need to work with the files inside the zipped file, and > there are times when the file is already on my computer, and their > others where the datafile sits on the Internet. > > Any help you can provide will be greatly appreciated. In full > disclosure, I usually learn by example and not by trial and error, so > any nudges in the right direction will be greatly appreciated.
See the extractall() method of ZipFile objects -- http://docs.python.org/library/zipfile.html Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list