Voldemort's Python import helper.
Project description
importmagician
Voldemort's Python import helper
pip install importmagician
Import from uninstalled Python directories
Say you have a directory (relative path ../../dir_a
) like this:
├── ../../dir_a
├── utils
│ ├── util_a.py
│ └── ...
└── ...
You want func_a
from utils.util_a.py
:
from importmagician import import_from
with import_from('../../'):
from utils.util_a import func_a
func_a() # use func_a
The advantage of importmagician is: outside of the with
statement, your sys.path
remains unchanged.
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
importmagician-0.1.0.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for importmagician-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e896947b69d0a5c334ed93b124ec181e285dca3b89b8501a9e58f350ebeb5629 |
|
MD5 | 0224adc75867f6f92ccd18dac4e53f74 |
|
BLAKE2b-256 | bc836369295498a9d36a63ba9fb406b14fd7c42fffe92d2e4585d092bd1dc045 |