File Management Python scripts - Top 4 Download

File Management Python script downloads

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

Generic file processor method

Generic file processor method script helps you to manage files. Old LineReader class was thrown to /dev/null - fd will really be exhausted during each call of process(), so a simple method is enough. ...
Python

Versioning file names

This script has the following action: if the specified file exists, it is versioned by appending to the extension a three-digit number, starting with "000".It's pomp;quot;0ake backups of files before you mangle them. A standard way of doing so is to appending to the extension an incremented number. The optional second ...
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

Helpful 5 liner version of os makedirs

This script contains a function that creates missing directories for a given path and returns a normalized absolute version of the path.If the given path already exists in the filesystem the filesystem is not modified.Otherwise makepath creates directories along the given path using the dirname() of the path. You may append a ...
Python

Safely morph a file in place

This script contains a class that enables a client to securely update an existing file, including the ability to make an automated backup version.This code encapsulates the method to safely update files in-place, by first writing to a temporary file and finally renaming the new temporary file to the old filename. This ...
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

Relative filepath

This script returns a relative path to the target from either the current directory or an optional base directory. Base can be a directory specified either as absolute or relative to current directory. ...
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

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

Quicken QIF file class and conversion

This script contains a simple class to represent a Quicken (QIF) file, and a parser to load a QIF file into a sequence of those classes. ...
Python

Checks for a valid POSIX filename

Checks for a valid POSIX filename script allows you to check for a valid POSIX filename. ...
Python

Dir lower

This script lowers the case of all the items found in a specified directory. ...
Python