News for hackers. Stuff that matters.
Re:Bpython is a fancy interface to Python by buster on Sunday January 27, 2013 @09:45AM (#5124395)
It's the first thing i install in my virtualenvs. Much better then the standard interactive console and just works out of the box. If you don't want more then tab completion, docstrings and a working command history between sessions it is great! For more stuff, see ipython.
Re:Bpython is a fancy interface to Python by ufo on Sunday January 27, 2013 @08:19AM (#5124136)
I see BPython has a list of alternative pretty interpreters listed on its page. iPython (that I know of) and DreamPie (that I don 't know of).

http://bpython-interpreter.org/alternatives/

Can anyone say how they all compare to each other?

Re:Bpython is a fancy interface to Python by belorn on Sunday January 27, 2013 @01:02PM (#5124992)
There aren't any comprehensive list that I know of which lists the features of each interpreter.

as to bpython vs ipython, last tested it out, bpython still lacked a core feature that ipython has, which is a shell-style history. I can't mention how often I am thinking "hmmm, did'nt I write something like that before", and search backward to find something I wrote a half year ago, or say yesterday...

Re:Bpython is a fancy interface to Python by digisign on Sunday January 27, 2013 @04:18PM (#5125705)
It always has, with the up arrow. Has a new word search (like ctrl+r) also. Not sure how long the hist is kept though.
Re:Bpython is a fancy interface to Python by bobfarrell on Monday January 28, 2013 @04:39AM (#5127834)
You can configure it to store on disk (I believe this is the default).

Why do people keep saying "last time I checked bpython didn't do X" when I can't even remember a time when we didn't offer this feature ? :)

Re:Bpython is a fancy interface to Python by wyuenho on Sunday January 27, 2013 @10:08AM (#5124449)
This is a great project that's been posted here on HN a couple of times already. I like this project a lot but I can't use it on my Mac because it swallows all the libedit/readline keyboard shortcuts I've come to expect from any REPL. Shame.
Re:Bpython is a fancy interface to Python by bobfarrell on Monday January 28, 2013 @04:41AM (#5127839)
This is one thing I actually have missed - if I'd known about all the nice readline key commands when I first started writing bpython I would've definitely included them. You're welcome to implement this yourself ! Otherwise, I guess it's just a matter of waiting until somebody else has enough time and enthusiasm to do it. Maybe I'll even do it myself one day ...
Re:Bpython is a fancy interface to Python by wahnfrieden on Sunday January 27, 2013 @12:22PM (#5124836)
Anyone know of a fix?
Re:Bpython is a fancy interface to Python by thauck on Sunday January 27, 2013 @10:11AM (#5124463)
Bpython is good, but IPython with %edit and knowledge of a command line text editor has changed my workflow[1]. I wish more repls had this ability.

[1]: Maybe you can do it Bpython and I'm just not aware.

Re:Bpython is a fancy interface to Python by JulianWasTaken on Sunday January 27, 2013 @10:21AM (#5124494)
I don't know what %edit does, but if I guess that it has something to do with an editor, I use this in my dotfiles:

https://github.com/Julian/dotfiles/blob/master/.pythonrc#L55

which is perfectly REPL agnostic.

I prefer bpython over iPython for a bunch of reasons that I can't easily elaborate on from here on my mobile, but is definitely suggest people try them both out.

Re:Bpython is a fancy interface to Python by thauck on Sunday January 27, 2013 @11:21AM (#5124659)
That's pretty nifty - thanks.

EDIT: Also, I have used bpython, but since I use python more on the data side as opposed to web (or something not data) IPython along with everything else make it too good to not use.

Re:Bpython is a fancy interface to Python by JulianWasTaken on Sunday January 27, 2013 @01:19PM (#5125026)
Yeah. That's where ipython probably hits the sweet spot, so that's reasonable.
Re:Bpython is a fancy interface to Python by bobfarrell on Monday January 28, 2013 @04:48AM (#5127856)
Hi there. It looks like IPython is definitely the better choice for you - I never wanted to add IDE-like features to bpython; I just wanted it to work the same as the regular shell but with a bunch of nice features on top. If you want something more complex, or something with more specialisation is certain areas then IPython is probably the better choice. Especially with the recent funding they've received I expect it will just get better and better. :)
Re:Bpython is a fancy interface to Python by Alex3917 on Sunday January 27, 2013 @12:30PM (#5124869)
Quick warning: Bpython crashes if you need to resize the terminal on OS X. And because it truncates the output to what can fit on the screen, it's essentially unusable for things with a long output. (Because if you need to scroll or resize the window to see the full output, it will crash.) It's amazingly good for most things, but occasionally I need to switch back to the default interpreter.
Re:Bpython is a fancy interface to Python by JulianWasTaken on Sunday January 27, 2013 @12:43PM (#5124917)
I can't say I've ever experienced this. I'll certainly try to reproduce when I get home.

Also bpython has a pager (F9), so it's definitely fine for long output. The interpreter also will write all output to stdout on quit, so you can do what you'd like then too.

I can't say I ever use the vanilla interpreter anymore other than when testing a bpython bug.

Re:Bpython is a fancy interface to Python by Alex3917 on Sunday January 27, 2013 @12:49PM (#5124940)
I just got this when doing print 10xx10000. Sometimes it crashes the first time I resize the terminal, sometimes I need to resize it a few times quickly. If you send me a note I can email you the error I get when it crashes.
Re:Bpython is a fancy interface to Python by bobfarrell on Monday January 28, 2013 @04:45AM (#5127849)
I can vouch for us appreciating a bug report. :)

I assume you're using an up-to-date version of bpython ? I remember dealing with this kind of stuff a lot in the past (curses is terrible at this kind of thing) and I had considered it fixed, so please do send us bug reports if possible. (https://bitbucket.org/bobf/bpython/issues?status=new&sta...)

Re:Bpython is a fancy interface to Python by JulianWasTaken on Sunday January 27, 2013 @01:08PM (#5125002)
I believe you :). I'm sure they'd appreciate a bug report if you can narrow things down certainly.

Otherwise I'll play around a bit.

Re:Bpython is a fancy interface to Python by bobfarrell on Monday January 28, 2013 @04:45AM (#5127850)
Thanks for taking the time to give this info out - looks like you know more about bpython than me. ;)
Re:Bpython is a fancy interface to Python by sebastinas on Sunday January 27, 2013 @03:09PM (#5125431)
That's a known issue [1], but we weren't able to fix it yet.

[1] https://bitbucket.org/bobf/bpython/issue/65/curses-error-on-...

Re:Bpython is a fancy interface to Python by andybak on Sunday January 27, 2013 @09:39AM (#5124383)
Also see iPython. Not as pretty but has an astonishing range of capabilities.
Re:Bpython is a fancy interface to Python by bobfarrell on Monday January 28, 2013 @04:49AM (#5127857)
+1 (from bpython's author)

They just got a huge funding grant so IPython is definitely one to watch.

Re:Bpython is a fancy interface to Python by wladimir on Monday January 28, 2013 @08:51AM (#5128450)
ipython can also be pretty at least when using the Qt console, for example it can embed pymatlib plots and sympy formulas inline instead of opening them in a window. I'm not sure whether bpython can do this.
Re:Bpython is a fancy interface to Python by NelsonMinar on Sunday January 27, 2013 @11:51AM (#5124747)
You can install bpython with a simple "pip install bpython". (This isn't immediately obvious from the website.)
Re:Bpython is a fancy interface to Python by wyuenho on Sunday January 27, 2013 @12:00PM (#5124768)
I don't know if it's still like that, but last time I checked, I had to invoke

    python -m bpython.cli
instead of just bpython to get autocompletion for packages in your load path. This project hasn't seen any commits since last March. If anyone is up for it, it can really use some help. It's a very promising project and I like it a lot, if only it didn't have those couple of annoyances... Too bad I have no time to contribute, I have 3 projects of my own to deal with...
Re:Bpython is a fancy interface to Python by bobfarrell on Monday January 28, 2013 @04:38AM (#5127830)
Hi there, I'm the author of bpython.

First thing's first: I'm not sure when you last tried bpython, but simply running "bpython" will provide import completion for your pwd.

As for there having been no commits since last March, well I'm not sure where you found that information - please see commit history on bitbucket page: https://bitbucket.org/bobf/bpython/commits

I started work on bpython about 5 years ago. These days I essentially don't do any work for it, but there are a couple of people who still take care of issues when they have time. It seems most people are pretty much satisfied with the project. If they aren't, I encourage them to either look at the open issues and try to close some of them, or try an alternative like IPython or DreamPie (IPython specifically just got a huge financial grant for development costs so it should be seeing a lot of work being done on it - should be very interesting to see what those guys do).

Either way, it just seemed a little odd to me to see bpython described as a "promising project" (after citing two falsehoods about the project) when I personally consider bpython as "complete" to a certain extent (and for any sane meaning of the word in software). Sure there are things I'd like to add, but bpython does exactly what I want and I rarely feel that there is something missing.

For those that disagree, either bpython is not for you (there are some great alternatives), or it is time to fork the project and send us your pull requests - we'll be very grateful for them. :)

Thanks,

Re:Bpython is a fancy interface to Python by gejjaxxita on Sunday January 27, 2013 @09:26AM (#5124348)
I'm finding it extremely buggy. For example - pressing F8 when no code has been entered yet causes a TypeError. I will post this on the mailing list but considering it's an old (~4yrs?) project I'm surprised such issues haven't been fixed.
Re:Bpython is a fancy interface to Python by sebastinas on Sunday January 27, 2013 @03:04PM (#5125412)
That's a bug in 0.12 that slipped in before the release. It's fixed in the hg mercurial and there will be a bugfix release soon.
Re:Bpython is a fancy interface to Python by gejjaxxita on Monday January 28, 2013 @07:12AM (#5128175)
great! I'm using pip to install.
Re:Bpython is a fancy interface to Python by calpaterson on Sunday January 27, 2013 @11:13AM (#5124623)
I'm not able to replicate that on my machine.

> bpython version 0.10.1 on top of Python 2.7.3

Re:Bpython is a fancy interface to Python by gejjaxxita on Sunday January 27, 2013 @11:58AM (#5124760)
bpython version 0.12 on top of Python 2.7.3
Re:Bpython is a fancy interface to Python by cm127 on Sunday January 27, 2013 @12:12PM (#5124804)
Tried "pip install bpython" on Windows 7, but I get an ImportError: No module named _curses.
Re:Bpython is a fancy interface to Python by sebastinas on Sunday January 27, 2013 @12:25PM (#5124850)
There are instructions to get it working on Windows at [1] and [2]. Please let us know if they work for you.

[1] http://docs.bpython-interpreter.org/windows.html [2] https://bitbucket.org/bobf/bpython/src/0f88fb19ee697096511d5...

Re:Bpython is a fancy interface to Python by superdude on Sunday January 27, 2013 @02:06PM (#5125188)
For Windows users..."pip install bpython" won't work. You must install the Curses binary. I suggest from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses
Re:Bpython is a fancy interface to Python by darrellsilver on Sunday January 27, 2013 @08:34AM (#5124172)
This looks like a great way to learn, too! The REPL is a fantastic place to play around.

Awesome.

Re:Bpython is a fancy interface to Python by knes on Sunday January 27, 2013 @08:58AM (#5124266)
Just installed it and it is AWESOME! I love the auto indent and auto complete!
Re:Bpython is a fancy interface to Python by TorbjornLunde on Sunday January 27, 2013 @08:38AM (#5124188)
Really cool. Does something similar exist for Ruby?
Re:Bpython is a fancy interface to Python by JonnieCache on Sunday January 27, 2013 @08:58AM (#5124267)
Re:Bpython is a fancy interface to Python by ddonline on Sunday January 27, 2013 @04:37PM (#5125782)
Oh you fancy huh? Nice work!
Re:Bpython is a fancy interface to Python by anujbans on Sunday January 27, 2013 @08:48AM (#5124224)
This is awesome :)