What is the difference between Python and IPython?

What exactly is the difference between Python and IPython?

If I write code in Python, will it run in IPython as is or does it need to be modified?

I know IPython is supposed to be an interactive shell for Python, but is that all? Or is there a language called IPython? If I write something under IPython, will it run in Python, and vice-versa? If there are differences, how do I know what they are? Will all packages used by Python work as is in IPython?


ipython is an interactive shell built with python.

From the project website:

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.
  • Note that the first 2 lines tell you it helps you make the most of using Python. Thus, you don't need to alter your code, the IPython shell runs your python code just like the normal python shell does, only with more features.

    I recommend reading the IPython tutorial to get a sense of what features you gain when using IPython.


    Even after viewing this thread, I had thought that ipython was a synonym for the python shell, in other words that typing python at the command line put one into ipython mode.

    It is in fact, as referenced above, a very cool interactive shell (command line program) that can be installed from iPython.org or simply by running

    pip install ipython
    

    or the more extensive:

    pip install ipython[notebook]
    

    from the command line.


    IPython is basically the "recommended" Python shell, which provides extra features. There is no a language called IPython.

    链接地址: http://www.djcxy.com/p/68936.html

    上一篇: 如何在IPython Notebook中编写LaTeX?

    下一篇: Python和IPython有什么区别?