What is the difference between Python and IPython?
Solution 1:
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.
Solution 2:
IPython is basically the "recommended" Python shell, which provides extra features. There is no language called IPython.
Solution 3:
IPython is a powerful interactive Python interpreter that is more interactive comparing to the standard interpreter.
To get the standard Python interpreter you type python
and you will get the >>>
prompt from where you can work.
To get IPython interpreter, you need to install it first. pip install ipython
.
You type ipython
and you get In [1]:
as a prompt and you get In [2]:
for the next command. You can call history
to check the list of previous commands, and write %recall 1
to recall the command.
Even you are in Python you can run shell commands directly like !ping www.google.com
.
Looks like a command line Jupiter notebook if you used that before.
You can use [Tab]
to autocomplete as shown in the image.
Solution 4:
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.