execute a function after each source code line ?

S

stef

hello,

doing a simulation of another language (JAL),
I translate the other language into Python code,
then I execute this converted Python code.

Now I need todo some checks and give visual feedback to the user,
each time a line of code is executed.

One way of realizing this, is to add a function call at each source code
line under investigation.

Are there any other (simple) ways of achieving this ?
(btw the whole program is running as an graphical (wxPython) application)

thanks,
Stef Mientki
 
D

Diez B. Roggisch

stef said:
hello,

doing a simulation of another language (JAL),
I translate the other language into Python code,
then I execute this converted Python code.

Now I need todo some checks and give visual feedback to the user,
each time a line of code is executed.

One way of realizing this, is to add a function call at each source code
line under investigation.

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.

http://docs.python.org/lib/module-trace.html

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top