Py7File

Convenient File Handling Library
Download

Py7File Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Publisher Name:
  • Titusz
  • Publisher web site:
  • http://github.com/titusz/

Py7File Tags


Py7File Description

Convenient File Handling Library Py7File is a Python module that wraps and unifies the Python stdlib file handling modules with a simple and intuitive high-level api.Installation:Use easy_install or pip:pip install py7fileUsage:Here some hopefully self explaining examples of Py7File usage:from py7file import Py7Filethe_file = Py7File('a_file.txt')# Copy and Movecopied_file = the_file.copy('d_file.txt') # copied_file is also a Py7filethe_file.move('moved_file.txt') # moves the file and mutates the reference# Backup and Restorethe_file.backup() # creates a_file_backup_001.txtthe_file.backup() # creates a_file_backup_002.txtthe_file.delete() # removes a_file.txt from disk (ups...)the_file.restore() # recovers file from a_file_backup_002.txt# Unzip and Rezipzfile = Py7File('a_file.zip')zfile.unzip() # creates a folder a_file_unzipped with contents of zipfilezfile.rezip() # repackages subfolder a_file_unzipped to a_file.zipSee test_py7file.py for more examples.TestingTo run the tests:python test_py7file.py Requirements: · Python What's New in This Release: · new EpubFile class that suports epub packaging · enhancments for Py7File subclassing


Py7File Related Software