Package mrv :: Module path
[hide private]
[frames] | no frames]

Module path

source code

path.py - An object representing a path to a file or directory.

Example:
>>> from path import path
>>> d = path('/home/guido/bin')
>>> for f in d.files('*.py'):
>>>             f.chmod(0755)

This module requires Python 2.4 or later.

TODO


Version: 3.0

License: Freeware

Classes [hide private]
  TreeWalkWarning
  Path
Represents a filesystem path.
  BasePath
Represents a filesystem path.
  ConversionPath
On windows, python represents paths with backslashes, within maya though, these are slashes We want to keep the original representation, but allow the methods to work nonetheless.
Functions [hide private]
    utilities
 
_to_os_path(path)
Returns: string being an os compatible path
source code
    Utilities
 
make_path(path)
Returns: A path instance of the correct type
source code
Variables [hide private]
  log = logging.getLogger("mrv.path")
  win32security = None
hash(x)
  basestring = str, unicode
  _textmode = 'U'
  _varprog = re.compile(r'\$(\w+|\{[^\}]*\})')
  __package__ = 'mrv'
    utilities
  _ossep = '/'
  _oossep = '\\'
Function Details [hide private]

_to_os_path(path)

source code 
Returns:
string being an os compatible path

make_path(path)

source code 
Returns:
A path instance of the correct type

Note: use this constructor if you use the Path.set_separator method at runtime to assure you will always create instances of the actual type, and not only of the type you imported last