What are the differences between ipython and bpython?
Asked Answered
T

2

110

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

Tightwad answered 20/11, 2010 at 13:21 Comment(2)
I disagree with the decision to close this question. It's an excellent question that has actual, factual answers that aren't opinion based that I would like to know. Listing the features unique to each isn't an opinion - it's a matter of fact. Either a feature is present or it isn't. Whether the feature is worth having is an opinion, but that's not the question being asked.Boutte
check out bypython-curtsies, it doesn't clear the screen on launch, and it has some other neat features: pip install git+https://github.com/thomasballinger/bpython.git@curtsiesHearken
C
79

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!

Clarisclarisa answered 20/11, 2010 at 15:20 Comment(5)
interesting, I have been using ipython on my (windows) laptop for tab completion, and it offers basic command line? time to read some documentation...Reimers
What Mr. Marnach said is all true, and I haven't much to add aside from: I use them both with equal frequency -- bpython is particularly handy to inspect packages and live object hierarchies, and for pastebinning snippets; ipython's docstring/help/source-view shortcuts (thing? and thing??) are indispensable.Marsden
being able to use vi keybindings is probably the number one reason I use ipython.Nitrogenous
is this answer still current? There's been a lot of time passedUnwitnessed
@Unwitnessed I don't know, but ipython is definitely the more popular option.Clarisclarisa
E
38

IPython Notebook (since 0.12) is a killer feature.

Eveleen answered 22/12, 2011 at 21:31 Comment(1)
ipython rocks. for use cases where bpython did fit better than ipython though I prefer this: github.com/jonathanslenders/ptpython. Faster output than bpython curtsies mode and ansi color output works.Branton

© 2022 - 2024 — McMap. All rights reserved.