Import source file from the file system for Python
Project description
fsimport
Import source file from the file system for Python
This library is a very simple wrapper around
spec = importlib.util.spec_from_file_location('module', str('/full/path/to/module'))
module_inst = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module_inst)
It allows for a convenient way to import files based on the file system path. The path is relative to the caller script.
Usage:
import fsimport
include_lv0 = fsimport('../../include_lv0')
include_lv1 = fsimport('../include_lv1')
include_lv2 = fsimport('./include_lv2')
include_lv3 = fsimport('./lv3/include_lv3')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fsimport-0.0.1.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fsimport-0.0.1.tar.gz.
File metadata
- Download URL: fsimport-0.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
003cea6736e8d74a1c6ca6f20bee216b99a0644b295ccec768adfd513256f8c9
|
|
| MD5 |
d0938508f8c2e6a8252e0ae926cb4021
|
|
| BLAKE2b-256 |
bb204c869b9e24277f41edfe57b350cdfef9ceb72178afc0585385e1ba4e2f9d
|
File details
Details for the file fsimport-0.0.1-py3-none-any.whl.
File metadata
- Download URL: fsimport-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af220d5eb205748803c68147dbf7556d0f4fc28bdc97f48a69c0999971cac8bb
|
|
| MD5 |
6347f89b6cdc3f98bcebf30524f4836e
|
|
| BLAKE2b-256 |
2ba2d78614483ba6c5bf803d6383dd70e63b6ed374a6ddd42fe54774f150e6f1
|