file compression
Gerrit Muller
gerrit.muller at embeddedsystems.nl
Tue Jun 29 02:36:17 EDT 2004
Skip Montanaro wrote:
> Elaine> The files I'm working with are python modules and LaTeX source
> Elaine> files, and I need to make them into archives so I can store them
> Elaine> in my website.
>
> Check out the zipfile module and class:
>
> % pydoc zipfile
> ...
> class ZipFile
> | Class with methods to open, read, write, close, list zip files.
> |
> | z = ZipFile(file, mode="r", compression=ZIP_STORED)
> |
> | file: Either the path to the file, or a file-like object.
> | If it is a path, the file will be opened and closed by ZipFile.
> | mode: The mode can be either read "r", write "w" or append "a".
> | compression: ZIP_STORED (no compression) or ZIP_DEFLATED (requires zlib)
> ...
>
> Skip
>
I use ZipFile exactly as described here to pack my latex and visio
source files adn publish them on internet at the Gaudi systems
architecting website:
<http://www.extra.research.philips.com/natlab/sysarch/>. This works
great: only a few lines of code are needed.
regards, Gerrit
--
Gaudi systems architecting:
<http://www.extra.research.philips.com/natlab/sysarch/>
More information about the Python-list
mailing list