execute a function after each source code line ?
showell30 at yahoo.com
Fri Jun 1 12:48:09 CEST 2007
--- "Diez B. Roggisch" <deets at nospam.web.de> wrote:
> > Are there any other (simple) ways of achieving
> this ?
> > (btw the whole program is running as an graphical
> (wxPython) application)
> use the python trace facilities.
I'm not sure how much that will help in a GUI
event-driven environment like wxPython. Since the OP
is generating his own Python code, he can insert his
own tracing statements.
I think the essential problem is how do you run the
intrepreted Python program in a mode that you can have
the GUI get an event, let the intrepreted program run
the next instruction, have the GUI get another event,
have the intrepreted program run to the next
There are probably ways to achieve this, such as
running the intrepreted Python program in a thread,
but my own experience in this in wxPython, with Guido
van Robot, led me to believe that it's ultimately
easier to create a virtual machine for your intepreted
But I may be missing your point.
Don't get soaked. Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
More information about the Python-list