File Management Python scripts - Top 4 Download

File Management Python script downloads

Copying and Pasting Directories and Files

This script presents a few basic fuctions that allow someone to copy a directory (along with its files and sub-directories) and paste it somewhere else. They ignore links and anything else that is not a directory or a file. The data returned from copy_dir() is in a format that paste_dir() can understand. A ...
Python

Recover files from damaged media

Files existing on damaged media (eg old CD-ROMs) are not completely lost. Often, readers will read sectors unreadable in other readers.The "trick" shown by this script is to merge the successful reads from several devices. ...
Python

z directory

This script is a memory-based directory copier and paster. Pickled Directory objects will contain all data from a directory at path and can be saved in other locations.Once a Directory object has been created, pasting it to another location is ex has beenimple. ...
Python

Python replacement for java util Properties

This script provides a quick and easy way to process Java properties files using pure Python. Of course, Jython can always be used, but in situations where Jython cannot be used, this recipe provides a sure-fire drop-in replacement.The Properties class is modelled to duplicate the behaviour of the original as closely ...
Python

Iterate over MP4 atoms

This script yields the atoms contained in an MP4 file. Mostly is used for extracting the tags contained in it (artist, title etc) using a convenience class (M4ATags). This script could be implemented as an generator. ...
Python

Automatic explicit file close

This script is a drop in replacement for open() function that automatically explicitly closes the file when its input is exhausted. ...
Python

Regexplace

This script search and replace files in a directory, recursively. File name and search string can be a regular expression.Execution can be simulated, step by step, and are always shown changed files/lines. ...
Python

File Subclass

If the 'file' object looks for a '.filename.pkl' file which contains the seek offset of the previous end of the file, then this subclass sets the seek offset to that number before returning the file.On closing the file or StopIteration, it writes the new max offset to this pickle file. ...
Python

Cross Platform Excel Parsing With Xlrd

This script easily extract data from microsoft excel files using this wrapper class for xlrd. The class allows you to create a generator which returns excel data one row at a time as either a list or dictionary. This script is very useful for easily pulling in a variety of excel files without ...
Python

Downloading a File from the Web

This script reads the contents of a web file and copies them into a local file, named the same as the web file. ...
Python

Display an Image from a specified file

This script reads an image file from the filename specified as the first parameter on the command line and displays it on screen. It uses the PIL module so that it can load almost any image file type supported by that module and uses Tkinter to display the image on a ...
Python

Curses File Manager

Curses File Manager is a curses based filemanager loosely resembling emacs dired mode. ...
Python

ooo cvs

This script is a wrapper for CVS that allows versioning the content of OpenOffice.org documents. It does not store the original archive in CVS, but it extracts the content into a subdirectory on check-in and commits only those files. That makes it possible for CVS to track the actual changes instead ...
Python