On Tuesday 07 November 2006 14:14, Christian wrote:
> Diez B. Roggisch wrote:
> > > I use REPL extensively while programming in Lisp and Python. Is there
> > > any way to enable REPL in TurboGears? It would be nice to be able, for
> > > example, to perform some queries or redefine some functions on a
> > > running server.
> >
> > I think the concept of a event-loop (as in web-server and gui apps for
> > example) doesn't fit too well with a REPL.
>
> Actually, it can work quite well.  There are a number of ways to
> accomplish this with CherryPy (and thus TurboGears, I imagine).
>
> > what I do is this: I put the following snipplet on a piece of code I
> > want to dig into, and possibly experiment:
> >
> > import pdb
> > pdb.set_trace()
>
> Here are some other options:
>
> HTTPREPL - http://projects.amor.org/misc/wiki/HTTPREPL
> Probably your best option.  In browser REPL to let you interactively
> poke around in your running app.  There is no built in security, so
> don't just make this available on your public app ;-)
>
> Using the interpreter directly -
> http://blog.dowski.com/2006/03/05/cherrypy-and-the-interactive-interpreter/
> This is a handy way to get inside of your app if you don't want to do
> it through the web.  Plus, it doesn't require any additional packages
> to install - just CherryPy/TurboGears and the good ol' interactive
> interpreter.
>
> Also, as Kevin mentioned in the comments of my blog posting on the
> interactive interpreter, it sounds like TurboGears has some sort of
> built in interpreter in the toolbox.

ah, one never stops learning. Thanks for the suggestions. I still like my 
approach to debug errornous code when the full request/response context is 
available. But that doesn't make the real repl useless. Thanks,

Diez

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to