For political reasons I have made pyparsing and pygments actual dependencies.
It seems that unless bpython actually won't work without these two packages
then certain Norwegian people will not package bpython for Ubuntu with them
as actual dependencies, meaning people would have to apt-get install them
separately (by which point they would probably have decided bpython sucks and
won't ever use it again). Jorgen is right, though - they are a huge part
of what makes bpython what it is, so they should be dependencies.
The extra linebreak was irritating but I didn't notice it on my setup because I
already have a linebreak on exit, or something. Also C-d now only exits if
there's a blank line, as per the vanilla interpreter.
Now bpython doesn't go wrong if you do, e.g.:
print "abc", "def", "ghi"
I was handling stdout faking in a really peculiar way, for some reason.
Now I don't and it works fine, go figure.
No idea how I didn't notice this one sooner; I think it was just there
in my periphery and I got used to it and forgot it was actually there,
but now the rightmost column gets fully used. I also fixed another
couple of little bugs that don't come up very often.
As far as I know this should run fine on 2.4 without any problems.
Thanks a bunch to Seamus for making me have to write ugly code to make
bpython compatible with his computer from the 1800s.
Now there's an option to require hitting tab to display the completion
window instead of having it pop up automatically as you type. You need
to edit the source at the moment (change OPTS.auto_display_list), the
next commit should have config file support.
A few people pointed out that help() can cause problems, specifically
when the help string is really big, so I've internalised it and injected
my own help() function into the interpreter which pages the output, but
it's pretty ghetto so I'm open to suggestions for improvement.
That said, it's pretty obvious that scrolling up and down (like less)
would be the main requested improvement so I should get to work on that
at some point.
Things like C-p and C-n and all that were just being echoed as ^P, and
only one character was being put into the buffer, whereas two were being
echoed. Now only printable characters are accepted for regular input.
Olivier Grisel pointed out that bpython ignores the PYTHONSTARTUP
variable. I never used it but the code was simple enough, cited here:
http://docs.python.org/tut/node4.html#startup
It's not much code at all, but let me know if it breaks anything (I
don't see why it should).
scapy seems to have a bug in it in that it expects stdout to have a
flush() method, which is not specified in the documentation for the sys
module (it specifies that it requires only a write() method to be
acceptable). So this is a hack to fix it, it's harmless though.
Ben Ford pointed out that the escape key can cause things to go a little
awry, I've fixed that and added another fix for potential breakage that
hadn't come up before.
If it isn't actually fixed in this release then it will be soon as I
have (hopefully) done it in a much more intelligent way than it was
before. I haven't tested it thoroughly yet (no matter how hard I try
there always seems to be one that gets away every time) so I'll just use
it as it is and cross my fingers. :-)
Thanks to Aaron Gallagher (habnabit) for pointing this one out. The code
had been bugging me for a while with its potential for huge inefficiency,
the way it works now should be much, much faster.
I added a thing so you can hit C-Backspace to go to the beginning
of the line, and then I figured I should actually handle tabs
properly, so that's what it does now. Hooray. I think it might
break on other computers, oh well, too late now.
The suggestions for, e.g. foo.bar. would include "foo.bar." in
every suggestion, and it seemed like a pretty pointless waste of
space, especially for a curses app.