Commit Graph

70 Commits

Author SHA1 Message Date
Bob Farrell 71423dca8b version number changed in setup.py 2008-08-27 21:14:55 +01:00
Bob Farrell df3be40da1 Merge commit 'd1024000b6d18ab3a835b8da41eed8cf058536ad' 2008-08-27 21:13:15 +01:00
Charles Duffy d1024000b6 Setuptoolize bpython
- Use the setuptools entry_points mechanism
 - Move the primary bpython script itself into the bpython module with
   invocation via the setuptools entry_points mechanism.
 - Fix setup.py whitespace to be consistant (4-spaces only)
 - Ignore setuptools-generated build products
2008-08-26 12:59:22 -05:00
Bob Farrell 9b9e15423b History file support added.
Defaults to ~/.pythonhist but can be configured in rc (see sample-rc)
2008-08-25 18:40:11 +01:00
Bob Farrell 0c220f93de Small problem with PYTHONSTARTUP execution fixed.
Changed the way it parses and executes the file so that it actually does
execute it now; not sure what the problem was before exactly but it's fixed
now.
2008-08-25 12:52:48 +01:00
Bob Farrell b43ba3da9d Bug fix re: PYTHONSTARTUP
I've never used this feature but Thorsten Kampe reported problems with it.
Unfortunately the way I was parsing the file was line-by-line which was causing
bpython to blow up when it encountered a double line-break, which was pretty
stupid on my part. It now takes the whole file at once.
2008-08-25 00:08:53 +01:00
Bob Farrell b7eac8de8c Forgot to take out debug code
Had a temporary hack in for development that doesn't belong in the code.
2008-08-24 23:44:00 +01:00
Bob Farrell b50a6adcbf raw_input() support added.
There's now a fake stdin object instantiated when the curses interface loads
which hooks in to the interface and calls a get_key method on it (some
refactoring done to make this work cleanly). I've only provided a readline()
method on this object (write, writelines and read are there too but no-ops) as
I can't think of any other use for reading from stdin in the interactive
interpreter.
2008-08-24 23:38:48 +01:00
Bob Farrell 3020d488a1 "if not len(self.s)" changed to "if not self.s" 2008-08-23 14:31:40 +01:00
Bob Farrell 1d77549a05 Damn changelog... 2008-08-23 14:06:57 +01:00
Jørgen P. Tjernø f8c37e843e Added C-w to delete a word to the left of the cursor. 2008-08-23 13:51:39 +01:00
Jørgen P. Tjernø e2d0cf4611 Added HOME, END and DEL handling. 2008-08-23 13:51:38 +01:00
Jørgen P. Tjernø a24febc593 Fixed man- & desktopfiles. 2008-08-23 13:51:38 +01:00
Jørgen P. Tjernø dc69b0b244 Renamed Dummy-class to Struct. 2008-08-23 13:51:38 +01:00
Jørgen P. Tjernø d9be9ecc82 We now use configurable soft-tabs instead of literal tabs. 2008-08-23 13:51:38 +01:00
Jørgen P. Tjernø 9c533ea627 Cleaned up some issues from pychecker, mostly unused variables / arguments. 2008-08-23 13:51:38 +01:00
Jørgen P. Tjernø 31de75819b addc -> addstr, header comment changed. 2008-08-23 13:51:38 +01:00
Jørgen P. Tjernø 9e34f05959 Fix some warnings, allow easier checking with pychecker. 2008-08-23 13:51:38 +01:00
Bob Farrell e615100cd9 Damn changelog 2008-08-19 09:45:41 +01:00
Bob Farrell 3786392274 pyparsing and pygments are now actual dependencies.
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.
2008-08-19 09:42:21 +01:00
Bob Farrell bdc4320a72 Forgot to include the CHANGELOG, as usual. 2008-08-16 10:44:16 +01:00
Bob Farrell 29e2acbf96 Extra linebreak added to stdout output and C-d behaviour changed.
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.
2008-08-16 10:39:42 +01:00
Bob Farrell 89edc92506 Added manpage to repo, thanks Jorgen 2008-08-16 10:35:24 +01:00
Bob Farrell f75c2b398e Found a print statement lying around.
I don't really use the rc file with bpython but there was a print statement I
must have been using for debugging in the rc file parsing routine.
2008-07-19 22:57:19 +01:00
Bob Farrell d5635ab400 KeyboardInterrupt clears list win properly now 2008-07-03 12:19:53 +01:00
Bob Farrell 4a97c035a9 Typo fixed 2008-06-28 14:22:31 +01:00
Bob Farrell 39aef3aeb9 rpartition changed to rsplit for 2.4 compat 2008-06-27 17:05:41 +01:00
Bob Farrell 152a445774 Instead of the last commit, there's now an error if it crashes out
Turns out printables wasn't the only thing missing in older versions so
I put an error message in instead.
2008-06-27 16:31:40 +01:00
Bob Farrell 03fa87151d pyparsing backward compatibility magic
"printables" doesn't seem to be available in some older versions of
pyparsing so I've put it in myself instead.
2008-06-27 16:10:36 +01:00
Bob Farrell 2f3f7b63d0 stdout faking improved
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.
2008-06-25 19:53:32 +01:00
Bob Farrell 2f300db252 help() now works just the same as vanilla help() 2008-06-25 17:49:47 +01:00
Bob Farrell 810e1327c2 All columns in list window now used fully
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.
2008-06-24 23:54:27 +01:00
Bob Farrell b5f24287e4 pyparsing import cleaned up
An ImportError was being raised for pyparsing even if it was being
partly successfully imported which may have caused problems in other
places.
2008-06-24 20:57:58 +01:00
Bob Farrell d8c51fc580 Added insult to Seamus for being a dickhead. 2008-06-24 19:29:44 +01:00
Bob Farrell b2226509f0 Now 2.4-compatible.
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.
2008-06-24 19:16:29 +01:00
Bob Farrell 760aa7aa47 setup.py updated 2008-06-24 18:08:24 +01:00
Bob Farrell fe4b4fc988 sample-rc included with package 2008-06-24 18:07:49 +01:00
Bob Farrell 3382036844 Screwed up my commit.
Oops, messed up a little. Hopefully everything's okay. I moved
internal.py to _internal.py so it isn't cluttering the namespace so
much, and also I forgot to mention that I wrote a config parser using
shlex so you can set any attribute of the OPTS object now, e.g.

auto_display_list
syntax
arg_spec
2008-06-24 17:39:53 +01:00
Bob Farrell 93ad83025b Fixed the pager and help so the full help is displayed
Also added a 'q' option to the pager to cancel out of huge help pages.
2008-06-24 17:33:32 +01:00
Bob Farrell ad410584c9 My homie Brendogg axed me for manual display of the completion window
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.
2008-06-24 16:18:19 +01:00
Bob Farrell 2f6555bfd2 help() fixed up so it's internalised
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.
2008-06-21 18:55:31 +01:00
Bob Farrell 414b8a3daf Unprintable character handling fix
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.
2008-06-18 23:36:10 +01:00
Bob Farrell a497cca157 Sizing of autocomplete window yet again fixed!
I hate this kind of stuff; I'm pretty bad at it. But I think I've made
it more stable now.
2008-06-18 23:30:57 +01:00
Bob Farrell 25e8ccac4c PYTHONSTARTUP actually works now.
I didn't have a chance to test the code I put in before committing but I
gave it a test run now, it seems to work fine.
2008-06-17 15:03:17 +01:00
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