What is the difference between Python and IPython?

前端 未结 7 1665
傲寒
傲寒 2020-12-07 08:18

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 IPy

7条回答
  •  一整个雨季
    2020-12-07 08:43

    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.

提交回复
热议问题