Is it possible to run a script that uses ipython-specific functionality (non-python)?
I am considering ipython as an extension of python here, since it supports things like bang (!
) and magic (%
, %%
) commands.
Therefore my question is that if it's possible to have something like an .ipy
script file that is written in the "ipython language" and that I can run non-interactively, like I would do with a normal python script (python script.py
).
A simple example of what I would like to achieve:
# valid ipython code
files = !ls
print(files)
(that is my ls.ipy
)
run it like:
python ls.ipy
# output: list of files in this directory