Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 468 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 468 Bytes

gitpath

A few functions to make working with python inside git repos easier.

path handling

gitpath.root() returns the absolute path of the repository root directory

gitpath.abspath(_rel_path_) returns an absolute path for a path given relative to the root directory, so assuming, this repo resites in /home/maxnoe/python-gitpath:

import gitpath

print(gitpath.abspath('setup.py'))

Will give you: /home/maxnoe/python-gitpath/setup.py