Mutable Pathlib
Project description
mutapath
This library is for you if you are also annoyed that there is no mutable pathlib wrapper for use cases where paths are often changed. mutapath solves this by wrapping the extended pathlib library path.py and updating the encapsulated object every time the path might be changed.
>>> from mutapath import MutaPath
>>> folder = MutaPath("/home/joe/doe/folder/sub")
>>> folder
Path('/home/joe/doe/folder/sub')
>>> folder.name = top
>>> folder
Path('/home/joe/doe/folder/top')
>>> next = MutaPath("/home/joe/doe/folder/next")
>>> next
Path('/home/joe/doe/folder/next')
>>> next.rename(folder)
>>> next
Path('/home/joe/doe/folder/top')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mutapath-0.1.5.tar.gz
(3.7 kB
view hashes)