Steven D'Aprano wrote: > On Fri, 19 Oct 2007 18:38:06 +0200, stef mientki wrote: > > >> I don't have pointers, I've just names (at least I think). Let me >> explain a little bit more, >> I want to simulate / debug a user program, the user program might look >> like this: >> >> x = 5 >> for i in xrange(10): >> x = x + 1 >> > > > I thought you were writing a JAL interpreter: > > http://en.wikipedia.org/wiki/JAL_(compiler) > > hi Steven, you're completely right, in fact I want to some more: also taken hardware and physics into account. You can see one of my first demo's here, to see what I mean: http://stef.mientki.googlepages.com/jalspy_demo_robot1a.html and some more demos can be found over here: http://oase.uci.kun.nl/~mientki/data_www/pic/jalspy/jalspy_animated_demos.html In fact we already used the simulator a number of times in real applications with great success, but didn't release it yet, because you still need Python knowledge to run it reliable. > but the code above is Python. > Yes, right again ;-) The simulator translates JAL into Python, In the beginning I thought that was the easiest, I'm not sure about that anymore at the moment, but on the other hand that's just replacing one module. > Python already has a debugger. Try this: > > import pdb > help(pdb) > > Yes, Paul also pointed me into that direction, and to be honest, I expected there would be such a module, but I never searched for it, because .... If I see that I can cook dinner, when I (very seldom) test the program (I'm writing) in the debug mode, (assuming the IDE uses the same pdb), then this is far too slow :-(
I'll report back what my experiences are with pdb. cheers, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list