First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
1

Code for unzipping a file

asked Jul 25 '13

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

1 answer

Sort by ยป oldest newest most voted
1

answered Jul 25 '13

Katherine gravatar image

updated Jul 25 '13

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.

link

Comments

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

JervisW gravatar imageJervisW (Jul 31 '13)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Jul 25 '13

Seen: 280 times

Last updated: Jul 25 '13