Ok, Now I have the debugging env set up.. ( I am trying to debug the web2py-wiki bug: 344665 Going into, design and clicking on "database administration"
here is what I do.... Installed ipython $ cd .ipython $ emacs ipy_user_profile.sh uncomment the "import ipy_profile_sh Now I do $ cd $WEB2PY_INSTALLDIR $ python web2py.py -S web2py_wiki -M $ dir() now returns all of the local namespace stuff like I would expect. Ok so now I want to replicate the request. $ http://127.0.0.1:8000/web2py_wiki/appadmin/index because this is the one that generates the error. I think I can nail it down to a couple of methods in the appadmin.py and I thing that the databases = get_databases(None) is not occuring like it should.... but what I am really after is how do I replicate this request $ http://127.0.0.1:8000/web2py_wiki/appadmin/index while I am in interactive mode. Thanks Jeff On Mar 18, 11:02 am, Jeffield <[email protected]> wrote: > > Since you say you are seeing NO local namespace names, I assume you only > > have python (not ipython installed), > > Thanks again Yarko, > The problem was that I did not have ipython installed ( I know you > said that we needed it... I just > assumed that I had it because I knew that python shell worked.) > > > > print db.tables > > > print globals() > > these both work now. > and so does dir() > ( going to read up on ipython now) > > > I'd also like to know what platform you are running on, and what you did to > > get web2py (e.g. which web2py?) > > I am currently running ( testing with 3 different versions of web2py.) > 1.58, 1.59 and trunk (which currently is 1.59) > > I am running ubuntu > $ cat /etc/lsb-release > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=8.04 > DISTRIB_CODENAME=hardy > DISTRIB_DESCRIPTION="Ubuntu 8.04.1" > > $ python -V > Python 2.5.2 > > > python web2py.py -a 'hello' > > and get a "welcome" page athttp://127.0.0.1:8000? > > yep works just fine. > > On Mar 18, 12:55 am, Yarko Tymciurak <[email protected]> wrote: > > > On Wed, Mar 18, 2009 at 1:23 AM, mdipierro <[email protected]> wrote: > > > > Do you have a db in model? try > > > > print db.tables > > > print globals() > > > well, dir() would show some names.... > > > Since you say you are seeing NO local namespace names, I assume you only > > have python (not ipython installed), > > there seems to be something fundamental missing... > > > Even if you had no "web2py_wiki" application, the shell startup would ask if > > you wanted to create it, and you would have no less than a clone of the > > "welcome" app under a new name, and that would show you _something_ in your > > namespace. > > > Something very fundamental is missing here. > > > Can you run web2py like this: > > > python web2py.py -a 'hello' > > > and get a "welcome" page athttp://127.0.0.1:8000? > > > What is the output of web2py when you invoke the above way? > > > I'd also like to know what platform you are running on, and what you did to > > get web2py (e.g. which web2py?) > > > > On Mar 18, 1:05 am, Jeffield <[email protected]> wrote: > > > > yep. > > > > > On Mar 17, 11:47 pm, Yarko Tymciurak <[email protected]> wrote: > > > > > > On Wed, Mar 18, 2009 at 12:15 AM, Jeffield <[email protected]> > > > wrote: > > > > > > > python web2py.py -S web2py_wiki -M > > > > > > .... now what.....?? > > > > > > I did a "dir" and it appeared that I had nothing in my local > > > > > > namespace, > > > > > > checked the book for reference on this .... nothing... > > > > > > Are you running this from your root web2py folder (where web2py.py > > > exists)? > > > > > > > On Mar 17, 12:18 pm, Yarko Tymciurak <[email protected]> wrote: > > > > > > > On Tue, Mar 17, 2009 at 12:42 PM, Wes James <[email protected]> > > > wrote: > > > > > > > > > On Tue, Mar 17, 2009 at 11:39 AM, Yannick <[email protected] > > > > > > > wrote: > > > > > > > > > > Hello mate, > > > > > > > > > Just wonder if there is a debugging mode with Web2py ? If yes > > > how can > > > > > > > > > I enable it ? If no maybe it can be a good feature to add for > > > > > > > > > developer since it will boost productivity during the > > > development > > > > > > > > > phase. > > > > > > > > Hi Yannick - > > > > > > > > There are a few things at your disposal: > > > > > > > > - as you know, the admin pages w/ tickets let you develop / > > > > > > > test > > > > > > rapidly; > > > > > > > - python web2py.py --help shows a few more options: > > > > > > > - --debug level (actually, I have never used - so I can not > > > say > > > > > > much > > > > > > > about this) > > > > > > > - -S appname --- this is great: it gives you shell access (a > > > > > > command > > > > > > > line) to your running app > > > > > > > - -S appname -M ---- this loads your model definitions > > > > > > > also; > > > if > > > > > > you > > > > > > > have ipython installed, then with completions this is really > > > > > > useful; you > > > > > > > can run both a shell (like this) and your server at the same > > > time. > > > > > > > - a few convenience items: -s server will set your server > > > name; -t > > > > > > > timeout will set request timesouts; > > > > > > > > I use -S xxx -M, and the web interface (and ipython - tab ==> code > > > > > > > completion; really good stuff). When I want to debug, single step > > > > > > through > > > > > > > someone else's code (ok, I have to debug my own too ;-), I use a > > > > > > commercial > > > > > > > product - WingIDE (it's run by a couple of great guys, one on the > > > PSF > > > > > > > board). > > > > > > > > I find WingIDE very useful. If you're at the conference, Stephan > > > is a > > > > > > few > > > > > > > Wing's to raffle, including one to be raffled at the web2py dojo > > > > > > > on > > > > > > Saturday > > > > > > > night. If you participate in the PyCon2009 code sprints Wingware > > > may > > > > > > again > > > > > > > this year give WingIDE licences to participants (a _great_ reason > > > to go > > > > > > to > > > > > > > code sprints), and in the past has given really good discount > > > coupons to > > > > > > > conference attendees. > > > > > > > > Hope that helps. > > > > > > > > Yarko > > > > > > > > > > Thank You, > > > > > > > > > > Yannick P. > > > > > > > > > Have you tried wingide? > > > > > > > > > -wj > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

