Inserting breakpoints ...
Stef Mientki
S.Mientki-nospam at mailbox.kun.nl
Sat Jun 16 09:22:34 EDT 2007
hello,
for the simulation of some micro language (JAL),
the original language is (with a minimal effort) translated into Python,
after which the code is run in Python.
I want to add a call to a debug routine,
called JSM(linenr), which performs task like wait, update user feedback, etc.
Now I can't find a nice solution,
to add the debug call in a if/for/while statement.
The orginal language looks like this
<Orginal Language>
For 16 * hardware_column loop
Write_lcd_2bytes ( write_text , 0 )
</Orginal Language>
This attempt doesn't work, because apparently I've to choose between
- 1 statement behind the ":"
- all statements in the line below
<Python attempt 1>
for xxx in xrange ( 16 * hardware_column ): JSM(78)
Write_LCD_2Bytes ( write_text , 0 ) ;JSM(79)
</Python attempt 1>
This works, but doesn't give a nice output
<Python attempt 2>
for xxx in xrange ( 16 * hardware_column ):
JSM(78)
Write_LCD_2Bytes ( write_text , 0 ) ;JSM(79)
</Python attempt 2>
any other ideas ?
thanks,
Stef Mientki
More information about the Python-list
mailing list