Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the differences between ipython and bpython?

What does ipython have that bpython lacks and vice versa? How do the two differ?

like image 261
igorgue Avatar asked Nov 20 '10 13:11

igorgue


People also ask

What is IPython and Bpython?

bpython is a lighter solution than IPython, which we discussed last time; where IPython expands the capabilities of Python itself, and offers interactive features as a sideline, bpython expands the interactive features of Python's shell — and that's about it.

What is difference between IPython and Python?

IPython is an interactive shell that is built with python. It provides a more useful shell environment to execute python code in REPL (Read Eval Print Loop). It makes it more interactive by adding features like syntax highlighting, code completion etc. IPython also comes with other tools like Jupyter Notebooks etc.

What is IPython used for?

IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.

Is IPython still used?

The IPython console is now deprecated and if you want to start it, you'll need to use the Jupyter Console, which is a terminal-based console frontend for Jupyter kernels.


1 Answers

If you just want an interactive interpreter, bpython should be fine. Just use it until you miss some feature you liked about IPython.

There are lots of features that IPython offers over bpython:

  • Special threading options. I like -gthread for experimenting with PyGTK and -pylab for matplotlib.

  • direct invocation of shell commands. cd in IPython is quite useful.

  • Full readline library support -- I can use the keyboard shortcuts I am used to.

  • Module reload facility - You can do a deep reload of a module after you have changed your code. This is very useful for testing and debugging.

  • Run functions in the background in a separate task with %bg.

  • A whole parallel programming environment (not really a feature you expect from an interactive Python shell, but IPython offers it).

This list could be nearly arbitrarily continued. And of course there will be lots of features in bpython lacking from IPython, but you did not ask for those.

So just use the one that works for you!

like image 53
Sven Marnach Avatar answered Oct 02 '22 15:10

Sven Marnach