What is the difference between a .py file and a .i

2020-07-10 08:27发布

问题:

I've tried saving (and running) a script in both ways, and running it using both ipython and python, but I don't see any difference. Are these filename extensions redundant?


Edit: the difference between python and ipython

回答1:

.ipy indicates that it's an IPython script. The only difference between IPython scripts and normal Python scripts is that IPython scripts can use IPython magics, e.g. %timeit, and run system commands as !echo Hi.