https://github.com/tkf/ipython-importfilemagic
https://github.com/tkf/ipython-importfilemagic
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tkf/ipython-importfilemagic
- Owner: tkf
- Created: 2012-06-09T20:58:07.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-21T15:45:43.000Z (almost 13 years ago)
- Last Synced: 2024-12-31T09:26:33.280Z (about 1 year ago)
- Language: Python
- Size: 121 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
`%importfile` magic for IPython
===============================
`%importfile` tries to import Python file in most "natural way". For
example, if you have ``spam/egg/module.py``, ``spam/egg/__init__.py``
and ``spam/__init__.py``, you would want import ``module.py`` as
``spam.egg.module``, not as ``module`` or ``egg.module``.
`%importfile` tries several heuristics to find the best "module path".
Install::
%install_ext https://raw.github.com/tkf/ipython-importfilemagic/master/importfilemagic.py
Usage::
%importfile PATH/TO/SOME/FILE.py