Pathway 1.3.1
A library for interacting with the filesystem
Pathway is a module for interacting with the filesystem in a clean,
object-oriented manner. For example, instead of::
datafile = os.path.join(datapath, 'somedata.txt')
if os.path.exists(datafile)
os.rename(datafile, datafile + '.old')
fd = open(datafile, 'w')
fd.write(data)
fd.close()
You can write the much cleaner:
datadir = pathway.new(datapath)
if 'somedata.txt' in datadir:
datadir['somedata.txt'].rename('somedata.txt.old', overwrite=True)
datadir.create('somedata.txt', data)
The majority of filesystem operations have corresponding methods. The module
itself has no dependencies besides Python.
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| Pathway-1.3.1.tar.gz (md5) | Source | 2010-01-18 | 5KB | 480 | |
- Author: LeafStorm
- Provides pathway
- Categories
- Package Index Owner: LeafStorm
- DOAP record: Pathway-1.3.1.xml
