1. Matthew Frazier
  2. pathway

Overview

Pathway

Author: LeafStorm
Homepage:http://bitbucket.org/leafstorm/pathway/
License:MIT
Python:2.4 to 2.6

Pathway is a simple Python library for interacting with the filesystem. It wraps many common file and folder operations in a clean, object-oriented syntax.

To use it, import pathway and use the new function to create a path object. These are all subclasses of PathObject - Folder for folders, File for files, and SomethingElse for another type of file. They all support pathname manipulations. In addition, Folder contains methods for listing and accesssing its children, and File makes it easy to get information about itself and load its contents. (SomethingElse just supports path operations.)

You can also use the PathFragment class to represent sequences of path components.

CAVEAT: Pathway is only intended for working with paths that actually exist on the local system. While you could obtain the path operations by directly initializing a PathObject, it's not recommended, and there is no way to make Pathway use other systems' path libraries (i.e. if you're on Windows you've got winpath, and if you're on Linux you've got posixpath).

Pathway is released under the MIT license (see the LICENSE file for the text thereof).