Easily add common paths to sys.path
Project description
SysPath
SysPath is a package to easily set common paths into sys.path
. Instead
of having to do a lot of path manipulation to properly import files, a
file can import from SysPath instead.
Installation
pip install syspath
Usage
To append the current file's directory to sys.path
:
import syspath syspath.append_current_path() # or from syspath import current_path
To append the current file's parent directory to sys.path
:
import syspath syspath.append_parent_path() # or from syspath import parent_path
To append the current file's git repository root to sys.path
:
import syspath syspath.append_git_root() # or from syspath import git_root
Each of the shortcut modules also provide a path
variable that can be
used to get the path added.
Development
pip install -r requirements-test.txt
mypy syspath --strict
coverage run setup.py test
coverage report
flake8
Publishing
pip install twine python setup.py sdist bdist_wheel twine upload dist/*
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size syspath-2.0.4-py3-none-any.whl (7.5 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size syspath-2.0.4.tar.gz (6.3 kB) | File type Source | Python version None | Upload date | Hashes View |