Using bpython for django shell

256 views
Skip to first unread message

Russ Brown

unread,
Jun 2, 2009, 11:19:07 AM6/2/09
to bpython
Hi,

I just came across this project and figured I'd give it a try. I most
use the python shell via django like so:

python manage.py shell

I wanted to try this using bpython instead, and hoped that it would be
s imple drop-in replacement. But when replacing the python with
bpython I get this backtrace:

Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/bpython/cli.py", line 1837, in
main
o = curses.wrapper(main_curses)
File "/usr/lib/python2.6/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "build/bdist.linux-x86_64/egg/bpython/cli.py", line 1794, in
main_curses
loadini()
File "build/bdist.linux-x86_64/egg/bpython/cli.py", line 1760, in
loadini
config.read(configfile)
UnboundLocalError: local variable 'configfile' referenced before
assignment

Any ideas?

Thanks,

--

Russ.

Bob Farrell

unread,
Jun 2, 2009, 12:00:18 PM6/2/09
to bpy...@googlegroups.com
Hello,

Yes, this was a bug, I've just fixed it in the hg repository and it will be in
the next release (which should be pretty soon). You can get the development
trunk here:
http://bitbucket.org/bobf/bpython/

Let us know how it goes using bpython as the Django shell.
--
Bob Farrell

Russ Brown

unread,
Jun 2, 2009, 12:07:03 PM6/2/09
to bpython
I just applied the same change to my current install and it did indeed
fix the problem.

Thanks for the very quick response, I'll try to give more feedback
once I've had chance to use it in anger. :)

On Jun 2, 11:00 am, Bob Farrell <robertanthonyfarr...@googlemail.com>
wrote:

Elias Torres

unread,
Jul 31, 2009, 1:24:19 PM7/31/09
to bpython
Hi Russ,

Can you tell me exactly what you did to get this working?

Thanks!

-Elias
Reply all
Reply to author
Forward
0 new messages