Code for unzipping a file
asked 2013-07-25 02:03:26 -0600
Anonymous
Hi Would you please help me with a python code for unzipping a file *.zip and then save the contents of the file to a directory
Thanks
First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
asked 2013-07-25 02:03:26 -0600
Anonymous
Hi Would you please help me with a python code for unzipping a file *.zip and then save the contents of the file to a directory
Thanks
You can do this by using the zipfile module in python:
import zipfile
zip = zipfile.ZipFile(r'c:\my.zip')
zip.extractall(r'c:\output')
If I could comment, I would also add that your question seems to be more of a python question than a PSS/E question. You might find answers to such questions more easily at stackoverflow.com.
Asked: 2013-07-25 02:03:26 -0600
Seen: 279 times
Last updated: Jul 25 '13