What Is IPython

Q

What Is IPython?

✍: FYIcenter.com

A

IPython is a comprehensive environment for interactive and exploratory computing with Python language.

IPython has three main components:

  • An enhanced interactive Python shell, represented by the "ipython" command.
  • A decoupled two-process communication model, which allows for multiple clients to connect to a computation kernel, most notably the web-based notebook
  • An architecture for interactive parallel computing.

"ipython" - Enhanced interactive Python shell - The first component of IPython that:

  • Provide an interactive shell superior to Python’s default. IPython has many features for tab-completion, object introspection, system shell access, command history retrieval across sessions, and its own special command system for adding functionality when working interactively. It tries to be a very efficient environment both for Python code development and for exploration of problems using Python objects (in situations like data analysis).
  • Serve as an embeddable, ready to use interpreter for your own programs. An interactive IPython shell can be started with a single call from inside another program, providing access to the current namespace. This can be very useful both for debugging purposes and for situations where a blend of batch-processing and interactive exploration are needed.
  • Offer a flexible framework which can be used as the base environment for working with other systems, with Python as the underlying bridge language. Specifically scientific environments like Mathematica, IDL and Matlab inspired its design, but similar ideas can be useful in many fields.
  • Allow interactive testing of threaded graphical toolkits. IPython has support for interactive, non-blocking control of GTK, Qt, WX, GLUT, and OS X applications via special threading flags. The normal Python shell can only do this for Tkinter applications.

"Client and Kernel" - Decoupled two-process model - As the second component, IPython has abstracted and extended the notion of a traditional Read-Evaluate-Print Loop (REPL) environment into a two-process model: Client and Kernel.

  • Client - It reads Python instructions and sends them to the Kernel to execute. It will also prints results received from the Kernel.
  • Kernel - It receives execution instructions from clients and communicates the results back to them.

This decoupling allows us to have several clients connected to the same kernel, and even allows clients and kernels to live on different machines. With the exclusion of the traditional single process terminal-based IPython (what you start if you run ipython without any subcommands), all other IPython machinery uses this two-process model. This includes ipython console, ipython qtconsole, and ipython notebook.

Interactive parallel computing - As the third component, IPython added an architecture that allows parallel computer hardware, such as multicore CPUs, clusters and supercomputers, to be used quickly and easily from Python. Moreover, this architecture is designed to support interactive and collaborative parallel computing.

For more technical information, see IPython documents.

 

Install IPython in Conda Environment

Installing IPython as Jupyter Kernel

Installing IPython as Jupyter Kernel

⇑⇑ Jupyter Tutorials

2021-11-25, 681🔥, 0💬