Save to file now outputs executable code (i.e. without the >>> and ... and with
"# OUT: " prepended to all output lines). I never used this feature much but
someone asked for this behaviour.
This had the side-effect of me discovering the showsyntaxerror method on
code.InteractiveInterpreter, which I have now overridden and passed through my
own routines, so these errors are now in the same colour as the other
exceptions. Hooray.
A bunch of people were moaning about this, I guess they couldn't handle it. It
was kind of irritating me as well, it just doesn't seem to look as nice as it
should when you've got nested calls etc., oh well.
- 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
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.
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.
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.
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.