import_file
import_file is meant to import a python script from a normal file path. Relative (dotted) imports are complicated, and fixing sys.path just feels wrong.
Usage examples:
>>>from import_file import import_file
>>>mylib = import_file('c:\mylib.py')
>>>another = import_file('relative_subdir/another.py')
So now you aren’t limited to importing only within your package or trail of __init__.py files.
This should work for python 2.5-3.2 and it’s public domain, have fun.
Metadata
Release files for import_file 1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| import_file-1.11.zip | 6.1 kB | Details |
Release files / import_file-1.11.zip
| Download URL | import_file-1.11.zip |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f6b92d3928c3f1eaa915799370a1ef7f323ad86b89f2740a69e4c23c60ad7be
|
|
BLAKE2b-256 checksum How to use checksums |
6e0cec8618b20e15d8baae8a78e9d3027d2462f361562a5ea2674533a34544a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |