GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing learning-python.com — ziptools - The Bits That Python's zipfile Forgot ziptools — The Bits That Python's zipfile ForgotMeet ziptools, a free program and library that lets you create and extract zipfiles on all your devices, using sorely needed tools not available in Python's built-in zipfile support.Overviewziptools is both an importable module package and a collection of command-line scripts that create and extract zipfiles. It augments Python's zipfile module with crucial missing functionality. Most notable among ziptools' enhancements:
There's more on ziptools' features here. ziptools is also portable—it can create and extract standard-conforming zipfiles on Mac OS, Windows, Linux, Android, and others, and it can serve as your sole zip and unzip utility on all these platforms. Simply use the local Python 3.X or 2.X, or install one where needed; ziptools works on either Python. UsageTo get started with ziptools:
The package's main create and extract scripts also come with loads of in-program documentation, as does its importable module used by the scripts. For code size, see the sloc. And yes, ziptools zipped itself like this: /...code$ python3 $Z/zip-create.py ziptools.zip ziptools -skipcruft -nocompress
Running ziptools 1.3
Zipping ['ziptools'] to ziptools.zip
Cruft patterns: {'skip': ['.*', '[dD]esktop.ini', 'Thumbs.db', '~*', '$*', '*.py[co]'], 'keep': ['.htaccess*']}
Adding folder ziptools
--Skipped cruft file ziptools/.DS_Store
Adding file ziptools/.htaccess
Adding file ziptools/__init__.py
Adding folder ziptools/cmdtest
--Skipped cruft file ziptools/cmdtest/.DS_Store
Adding file ziptools/cmdtest/_HOW-RUN.txt
...etc...
Adding file ziptools/ziptools/ziptools.py
--Skipped cruft file ziptools/ziptools/ziptools.pyc
Create finished: files=513, folders=264, links=0, unknowns=0, crufts=31.
If you had already installed ziptools, you could unzip its package like this (but use your local unzip tool the first time around): /...site$ $Z/zip-extract.py ziptools.zip . -permissions -nomangle Running ziptools 1.3 Unzipping from ziptools.zip to . Extracted ziptools/ Extracted ziptools/.htaccess Extracted ziptools/__init__.py Extracted ziptools/cmdtest/ Extracted ziptools/cmdtest/_HOW-RUN.txt ...etc... Extracted ziptools/ziptools/ziptools.py Extract finished: files=513, folders=264, links=0, unknowns=0. For info on ziptools command-lines, try this. For examples of other programs that build ziptools command lines on the fly, search for ziptools in genhtml's scripts here and here. And for details on importing and calling ziptools' tools more directly, see its examples and code docs. Etcetera
For more code examples, see the programs page. | ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |