do shorter code to import from relative path
Project description
Add relativeimport
to python
####
# suppose:
# /lib../lib_998/lib_998_1.py
# /lib../lib_998/lib_998_2.py
# /lib../lib_998/lib_998_3/__init__.py
# /lib../lib_999/lib_999_1/lib_999_1_1.py
# /lib../lib_999/lib_999_2/lib_999_2_5.py
# /lib../lib_999/lib_999_3/lib_999_3_7/__init__.py
# /lib../lib_1000.py
# /lib../lib_1002.py
# /lib../lib_1003/__init__.py
# /lib../lib_1006/lib_1006_6.py
# and this scripting is in `lib_1006_6.py`
####
import relativeimport
lib_998_1 = relativeimport(__file__, "../lib_998/lib_998_1")
lib_998_2 = relativeimport(__file__, "../lib_998/lib_998_2.py")
lib_998_3 = relativeimport(__file__, "../lib_998/lib_998_3")
lib_999_1_1 = relativeimport(__file__, "../lib_999/lib_999_1/lib_999_1_1")
lib_999_2_5 = relativeimport(__file__, "../lib_999/lib_999_1/lib_999_2_5.py")
lib_999_3_7 = relativeimport(__file__, "../lib_999/lib_999_3/lib_999_3_7")
lib_1000 = relativeimport(__file__, "../lib_1000")
lib_1002 = relativeimport(__file__, "../lib_1002.py")
lib_1003 = relativeimport(__file__, "../lib_1003")
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
relativeimport-99.0.6.tar.gz
(2.5 kB
view details)
Built Distribution
File details
Details for the file relativeimport-99.0.6.tar.gz
.
File metadata
- Download URL: relativeimport-99.0.6.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5e06fa42f44f6042e5681750a195f13e65403a1a264bd55b34f0e5c40a37b1a |
|
MD5 | 30a8a27e337333dfc2d641adef5cc730 |
|
BLAKE2b-256 | 1f501b9bd5fbab17b097ec62e86b9d41e09ea26528cd3cc6e291ebcd8b4583ca |
File details
Details for the file relativeimport-99.0.6-py3-none-any.whl
.
File metadata
- Download URL: relativeimport-99.0.6-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13b175d234e4f75a8696492fb65a4d91960b7d1464a0fd09996a9888346d2d1a |
|
MD5 | 0814c41b91f2773b475c1be701a03d84 |
|
BLAKE2b-256 | 89584b152306f66bb33a026cfa2e19c056227fdcb5132e0e9e13ef113d73c038 |