Ask Your Question
1

Code for unzipping a file

asked 2013-07-25 02:03:26 -0500

anonymous user

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-07-25 14:43:53 -0500

Katherine gravatar image

updated 2013-07-25 14:49:15 -0500

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.

edit flag offensive delete link more

Comments

<p>Stackoverflow.com is great for general Python questions.

JervisW gravatar imageJervisW ( 2013-07-31 03:14:15 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2013-07-25 02:03:26 -0500

Seen: 266 times

Last updated: Jul 25 '13