python - Unzip all files in zip archive with inline command -


i have zip file, no unzipping tool installed. have python installed, can't create python script file on machine. how unzip contents of zip file using python executable's -c argument?

i found solution this:

python -c "import zipfile;file=zipfile.zipfile('archive.zip');file.extractall('.')"

the contents of archive.zip placed directory command executed from.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -