4.15. foundations.pkzip
pkzip.py
- Platform:
- Windows, Linux, Mac Os X.
- Description:
- Provides archives files manipulation objects.
Others:
4.15.1. Module Attributes
-
foundations.pkzip.LOGGER
4.15.2. Classes
-
class foundations.pkzip.Pkzip(archive=None)[source]
Bases: object
Defines methods to manipulate zip files.
Initializes the class.
Usage:
>>> import tempfile
>>> tempDirectory = tempfile.mkdtemp()
>>> zipFile = Pkzip("zipFile.zip")
>>> zipFile.extract(tempDirectory)
True
Parameters: | archive (unicode) – Archive to manipulate. |
-
archive[source]
Property for self.__archive attribute.
Returns: | self.__archive. |
Return type: | unicode |
Extracts the archive file to given directory.
Parameters: | target (unicode) – Target extraction directory. |
Returns: | Method success. |
Return type: | bool |