Set project root path for importing local modules
Project description
Import project root path to sys.path
for import local files.
If you have a project with the following structure:
| - my_proj
|
| - my_proj / config / models / account_model.py (class AccountModel)
|
| - my_proj / transaction / checker.py (class Checker)
Use ccrootpath to simplize your import
:
import ccrootpath
PROJECT_DIR = ccrootpath.set_project_root_path(__file__, 'my_proj')
from config.models.account_model import AccountModel
from transaction.checker import Checker
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
ccrootpath-1.1.tar.gz
(1.9 kB
view hashes)