Skip to content

xando/os.path2

Repository files navigation

from os import path2 as path

The os.path library replacement with simple API.

>>> from os import path2 as path

>>> path('/var/log')
/var/log

>>> path('/var', 'log')
/var/log

>>> path('/home/you/file').user
'you'

>>> [(element.user, element.group, element.mod) for element in path('.')]
[('user', 'user', '0664'),
 ('user', 'user', '0664'),
 ('user', 'user', '0664'),
 ('user', 'user', '0664'),
 ('user', 'user', '0664'),
 ('user', 'user', '0664'),
 ('user', 'user', '0664'),
 ('user', 'user', '0775'),
 ('user', 'user', '0664')]

Status

Library seems to be pretty stable. Feel free to use it as you want. But I think this no the final version of API.

Install

You can install it from PyPi, by simply pip:

$ pip install os.path2

only if you don't have pip installed, an alternative method is easy_install:

$ easy_install os.path2

to test it, launch python

>>> from os import path2 as path

Supported platforms

  • Python2.6
  • Python2.7
  • Python3.3
  • PyPy1.9

Tests

https://api.travis-ci.org/xando/os.path2.png?branch=master
>>> python setup.py test

About

The os.path module replacement, with simple API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •