I'm running Ubuntu 10.04 and tried your code and it's working fine in
my case.

But, I do like to report that I occasionally see bpython crash and
revert to ipython. In some cases, the code I was trying out were pure
python code, not web2py code.


On Apr 14, 11:14 am, Bruno Rocha <[email protected]> wrote:
> I found an isssue running bpython on ubuntu 11.04
>
> I tried this:
>
> $python web2py.py -S welcome -B
>
> web2py shell started in bpython (looks awesome \o/), now I entered this
> code:
>
> >>> db = DAL("sqlite:memory")
> >>>db.define_table("person", Field("name"))
> >>>db.tables
> ['person']
> >>>db.person.insert(name="Tom")
> 1
> >>>rows = db(*"BPYTHON CRASHES AT THIS POINT"*
>
> *
> *
> *web2py shows this message:*
> WARNING:web2py:import bpython error; trying ipython...
> WARNING:web2py:import IPython error; use default python shell
>
> Everything keeps running well but in plain shell not bpython... I think the
> problem is to fetch and fill the *db(* definition
>
> *
> *
>
> --
> Bruno Rocha
> [ About me:http://zerp.ly/rochacbruno]
>
> On Mon, Apr 11, 2011 at 6:23 PM, Massimo Di Pierro
> <[email protected]>wrote:
>
>
>
>
>
>
>
> > Fantastic. I will try this asap. Meanwhile if other people try it please
> > let me know. Once tested, I have no objection to include it.
>
> > Massimo
>
> > On Apr 11, 2011, at 3:14 PM, Arun K.Rajeevan wrote:
>
> > Hi All,
>
> > BPythonhttp://bpython-interpreter.org/, is a lightweight  python console
> > with auto completion etc.,
> > It's a wrapper around standard python console.
> > for debian based systems do,
>
> > $> sudo apt-get install bpython
>
> > to install bpython, if not already have.
>
> > So as a response to the following thread,
> >https://groups.google.com/d/topic/web2py/prJjPAW5OEw/discussion
>
> > Here's a patch(attached) to enable the use of bpython instead of ipython.
>
> > use as
> > $> web2py.py --shell appname -B
> > $> web2py.py -S appname --bpython
>
> > patch is just an hg export, so a simple hg import will do.
> > I use latest code from repo, so there must not be any need for merging
> > something manually.
>
> > @Massimo: have a look at it, test it and if it's worth possibly add this to
> > web2py.
>
> > Thanks,
> > Arun.K.R
> > _________________________________________________
> > { Man can be Destroyed but cannot be Defeated.}
> > { As you live your days, so you craft your life. }
> > { In this world of no walls or fences, we don't need windows or gates! }
> > Registered Gnu\Linux User: #470196
> > Registered Ubuntu User: #25827
> > _________________________________________________
>
> > <bpython_patch>

Reply via email to