Debugging embedded python

Syver Enstad syver-en+usenet at online.no
Mon Apr 7 10:21:04 EDT 2003


"Martin v. Löwis" <martin at v.loewis.de> writes:

> Syver Enstad wrote:
> > I have the python interpreter embedded in a daemon/service (this is
> > win2k so it's a service). I'd really like to be able to debug the
> > python code that is running. I was thinking of popping up a console
> > window to be able to run pdb, how does one go about it to accomplish
> 
> > this? Are there any code doing similar things or articles.
> 
> I recommend that you find a non-daemon mode of operation, and support
> debugging there. This has tradition on Unix (atleast): many daemons
> support a do-not-fork-into-background-do-not-fork-many-processes mode,
> to simplify debugging.

Yes, I have found out how to make the process to behave more like an
ordinary python process, but I need to pop up a console window or
something similar that let's me inspect the python code. I first
thought about using PyCrust for this, but the service I am running in
fails to import wxPython.wx. I'll have a look at Python Programming on
Win32. I think it had something on creating a python console in a
running program.

I've also had a look at the HapDebugger. It seems pretty nice, I am
looking into how to embedd the client side of it into an multithreaded
application that calls python functions instead of running a single
script. It doesn't seem that undoable, I'll see where it leads me.

-- 

Vennlig hilsen 

Syver Enstad




More information about the Python-list mailing list