By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,100 Members | 2,892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,100 IT Pros & Developers. It's quick & easy.

execute a function after each source code line ?

P: n/a
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
Jun 1 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
stef wrote:
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
Jun 1 '07 #2

P: n/a
Diez B. Roggisch wrote:
stef wrote:

>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
thanks Diez,
that looks exactly what I need.
cheers,
Stef
Diez
Jun 1 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.