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.
Pascal Bleser was kind enough to package bpython for OpenSUSE
and sent me a patch to have it working with distutils, which
is always nice, so thanks a lot for that, here's the new
dir structure.