Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

import_file-1.11.zip (6.1 kB view details)

Uploaded Source

File details

Details for the file import_file-1.11.zip.

File metadata

  • Download URL: import_file-1.11.zip
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for import_file-1.11.zip
Algorithm Hash digest
SHA256 4f6b92d3928c3f1eaa915799370a1ef7f323ad86b89f2740a69e4c23c60ad7be
MD5 3660e420fe77a6b603ca69e91e1885a2
BLAKE2b-256 6e0cec8618b20e15d8baae8a78e9d3027d2462f361562a5ea2674533a34544a0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.11 This release

1 file

1.06

1 file

1.04

1 file

1.03

1 file

1.02

1 file

1.01

1 file

1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page