execute a function after each source code line ?

Steve Howell showell30 at yahoo.com
Fri Jun 1 07:15:55 EDT 2007


--- stef <s.mientki at id.umcn.nl> wrote:

> Steve,
> that's exactly what I've in mind.
> The screen shots, looks really good,
> and I'll definitely will take a deeper look into
> your code.

Cool, good luck.  Feel free to contact me privately if
you have questions about the implementation.  There's
also a mailing list for GvR, although it's not that
active at the moment.  It's not that the project is
dead, we just don't have much to add to it at this
point. :)

> I've one advantage over you,
> the language I want to simulate (JAL),
> is very Pascal like,
> and therefor can be easily converted into equivalent
> Python code.
> 

FWIW the language I was interpeting is also
Pascal-like, and as I mentioned, we initially
translated it into Python code as well.  Even when we
abandoned the idea of using Python to run the program
(er, this is like describing PyPy, we were still using
Python at the outer level, just not the inner level),
we still kept the code around to translate from GvR to
Python.

The translations from GvR to Python made it easy for
us to write unit tests like this:

'''
if front_is_blocked:
  turnleft
  if front_is_blocked:
    turnleft
    if front_is_blocked:
      turnleft
  move
''',
'''
if self.FRONT_IS_BLOCKED(0):
  self.TURNLEFT(1)
  if self.FRONT_IS_BLOCKED(2):
    self.TURNLEFT(3)
    if self.FRONT_IS_BLOCKED(4):
      self.TURNLEFT(5)
  self.MOVE(6)
'''

More here:

http://gvr.cvs.sourceforge.net/*checkout*/gvr/GvR/TESTgvrparser.py?revision=1.23&content-type=text%2Fplain




      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz



More information about the Python-list mailing list