.py文件和.ipy文件有什么区别? [英] What is the difference between a .py file and a .ipy file?

查看:232
本文介绍了.py文件和.ipy文件有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了两种保存(并运行)脚本的方式,并同时使用ipythonpython来运行它,但是我看不出有什么区别.这些文件扩展名是否多余?

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?

python和ipython之间的区别

推荐答案

.ipy表示它是IPython脚本. IPython脚本和普通Python脚本之间的唯一区别是IPython脚本可以使用IPython魔术,例如%timeit,并以!echo Hi身份运行系统命令.

.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.

这篇关于.py文件和.ipy文件有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆