python - Python 和 IPython 有什么区别?

Python 和 IPython 之间到底有什么区别? ?

如果我用 Python 编写代码,它会按原样在 IPython 中运行还是需要修改?

我知道 IPython 应该是 Python 的交互式 shell,但仅此而已吗?或者有没有一种叫做 IPython 的语言?如果我在 IPython 下写东西,它会在 Python 中运行吗,反之亦然?如果存在差异,我怎么知道它们是什么? Python 使用的所有包都可以在 IPython 中正常工作吗?

最佳答案

ipython是一个用python构建的交互式shell。

来自项目网站:

IPython provides a rich toolkit to help you make the most out of using Python, with:

  • Powerful Python shells (terminal and Qt-based).
  • A web-based notebook with the same core features but support for code, text, mathematical expressions, inline plots and other rich media.
  • Support for interactive data visualization and use of GUI toolkits.
  • Flexible, embeddable interpreters to load into your own projects.
  • Easy to use, high performance tools for parallel computing.

请注意,前 2 行告诉您它可以帮助您充分利用 Python。因此,您无需更改您的代码,IPython shell 运行您的 python 代码就像普通的 python shell 一样,只是有更多的功能。

我建议阅读 IPython tutorial了解您在使用 IPython 时获得了哪些功能。

https://stackoverflow.com/questions/12370457/

相关文章:

python - 在 Python 中获取临时目录的跨平台方法

linux - 使用sudo时如何保留环境变量

linux - 如何使用自定义分隔符将多行文件名合并为一个?

linux - 递归查找具有特定扩展名的文件

python - Django:显示选择值

python - 在 Python 中以 YYYY-MM-DD 获取今天的日期?

linux - 在shell中获取程序执行时间

python - Python进程使用的总内存?

python - Python 是强类型的吗?

linux - chmod 777 到一个文件夹和所有内容