4.14. foundations.pkzip

pkzip.py

Platform:
Windows, Linux, Mac Os X.
Description:
This module provides archives files manipulation objects.

Others:

4.14.1. Module Attributes

foundations.pkzip.LOGGER

4.14.2. Classes

class foundations.pkzip.Pkzip(archive=None)[source]

Bases: object

This class provides methods to manipulate zip files.

Usage:

>>> import tempfile
>>> tempDirectory = tempfile.mkdtemp()
>>> zipFile = Pkzip("zipFile.zip")
>>> zipFile.extract(tempDirectory)
True
Parameters:archive – Archive to manipulate. ( String )
archive[source]

This method is the property for self.__archive attribute.

Returns:self.__archive. ( String )
extract(target)[source]

This method extracts the archive file to given directory.

Parameters:target – Target extraction directory. ( String )
Returns:Method success. ( Boolean )

Table Of Contents

Previous topic

4.13. foundations.parsers

Next topic

4.15. foundations.rotatingBackup

This Page