Commit Graph

23 Commits

Author SHA1 Message Date
Bob Farrell ea096115cd close() also implemented for same hacky fix as flush()
The logging module tries to call both these methods, so I'm sure other
modules do as well.
2008-06-16 23:28:48 +01:00
Bob Farrell 7aa6db358c I cited the scapy module as being the cause of a problem, it wasn't.
It was actually a problem in the logging module.
2008-06-16 23:22:29 +01:00
Bob Farrell a5fce828f3 PYTHONSTARTUP variable is no longer ignored
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).
2008-06-16 22:40:55 +01:00
Bob Farrell 72376f7790 scapy expecting file-like methods that don't exist
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.
2008-06-16 22:37:01 +01:00
Bob Farrell 85d6485565 Escape key handling fix
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.
2008-06-16 22:09:23 +01:00
Bob Farrell 596a76e86f No more crashing on stupidly long entries in the autocomplete list
Thanks to habnabit for using lame modules that uncovered this one.
2008-06-14 17:15:41 +01:00
Bob Farrell b509d11833 I've finally managed to fix up the list drawing stuff.
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. :-)
2008-06-12 17:34:04 +01:00
Bob Farrell 8e7a267135 Really long members (haha) were causing trouble for completion, thanks habnabit.
The completion suggestions would cause a crash if one of them was too long, this is now fixed.
2008-05-03 02:01:46 +01:00
Bob Farrell b0b1caf043 Words needed an extra space between them so they don't squish together
Sorry about that.
2008-05-03 01:00:17 +01:00
Bob Farrell 032d0c439a Added a little optimisation to the new algo
Not really going to make a huge difference but it wasn't exactly
a great deal of work.
2008-05-03 00:51:55 +01:00
Bob Farrell 7a1efba043 Finally! The suggestions window works without breaking.
I actually sat down and did maths, and it worked! Whoosh.
2008-05-03 00:42:26 +01:00
Bob Farrell 45e44807fa dksaldasd 2008-04-30 18:48:21 +01:00
Bob Farrell 8c00dfd996 Whoops, DEBUG() calls left lying about again... 2008-04-30 16:07:08 +01:00
Bob Farrell bd6bc766a6 Entities with huge numbers of attributes were causing big problems
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.
2008-04-30 16:04:30 +01:00
Bob Farrell b509791910 expanduser more correct
Now it checks if fn.startswith('~'), rather than checking if there's a ~
in the string at all.
2008-04-29 02:05:24 +01:00
Bob Farrell 8421581d96 Tab stuff is much better now.
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.
2008-04-28 23:41:22 +01:00
Bob Farrell b7315c3928 Improved the autoindent stuff
The autoindent should work now with multiple levels of indenting.
e.g.:
def foo():
	def bar():
		def baz():
			print "hi"
			print "ho"
2008-04-28 16:34:23 +01:00
Bob Farrell 72ac830f04 os.path.expanduser() fixed
Thanks to Klaus Alexander Seis for the patch for this one.
2008-04-28 16:20:31 +01:00
Bob Farrell 5c84feb9db Auto-indent added
It was pretty trivial (it just autoindents if a line ends with a colon
or if the previous line was indented).
2008-04-28 15:33:27 +01:00
Bob Farrell 54f4f9fa27 Whoops, I'd left a DEBUG() call in there.
Sorry about that.
2008-04-27 23:56:45 +01:00
Bob Farrell dec6a17824 Tab completion suggestions no longer have pointless repetition
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.
2008-04-27 23:43:00 +01:00
Bob Farrell c4089f5cec Class __init__ spec lookup fixed on classes with no __init__
The AttributeError wasn't being caught on the lookup, which is now fixed.
2008-04-27 23:23:22 +01:00
Bob Farrell 7a1ebadb52 Whoosh, I've switched over to an installable package.
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.
2008-04-27 22:05:23 +01:00