Forum Archive

Download and unzip files

macfox2

What is the best way to download and unzip zip files? Can this be done in StaSh? I'm trying to download a CSV file from http://data.worldbank.org/.

Webmaster4o

You can use the included requests and zipfile modules. Check the documentation for more information.

bennr01

@macfox2 If you want to use StaSh, download the file using 'wget url_here' and unzip it using 'unzip file_here'.

ccc

Like what @Webmaster4o said... https://github.com/cclauss/Ten-lines-or-less/blob/master/world_bank_data.py

macfox2

Thank you, @bennr01 -- that did the trick!