%%idl magic for IPython and Jupyter notebooks, providing access to Harris Geospatial's IDL programming language.
Use IDL (interactive data language) inside IPython / Jupyter notebook cells. It uses the IDL-python bridge
idlpy, which is bundled with your IDL installation.
Install idlmagic with pip:
pip install idlmagic
Then, enable idlmagic in your notbook:
idlmagic relies on a valid installation of the IDL-python-bridge. To see if it is available, run
If the import fails, refer to the documentation to see how
idlpy can be set up.
idlmagic provides you with
%%idl to execute IDL commands, and
%idl_var to pass an IDL variable to python.
In : %load_ext idlmagic # run IDL using the %idl line magic: In : %idl INDGEN(5) 0 1 2 3 4 # or use the cell magic for multiple commands: In : %%idl ...: PRINT, INDGEN(5) ...: PRINT, INDGEN(6) 0 1 2 3 4 0 1 2 3 4 5 # to access IDL data in python, you'll first have to assign it: In : %idl a = INDGEN(4) # then use the %idl_var magic to get the IDL variable into python: In : a = %idl_var a In : a + 10 Out: array([10, 11, 12, 13], dtype=int16)
Check the documentation for more examples.
- first release
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for idlmagic-0.1.0-py2.py3-none-any.whl