Ask Your Question
1

Code for unzipping a file

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

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 -0600

Katherine gravatar image

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

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 -0600 )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 -0600

Seen: 279 times

Last updated: Jul 25 '13