Freeze and Resume execution

BruceKL WhoH BruceWhoHKL at gawab.com
Thu May 20 21:57:50 EDT 2004


I come across the same problem. 

What I want to do is to write a vim script to debug python script. Bdb(exactly, a derived class of Bdb) will be called, and when it break at some breakpoints, it must freeze, and come back to vim, then later, user will call 'step' or 'trace' or 'continue', then Bdb will be called again and resume.

Just last week I posted a mail to ask, but it seems that it's impossible to do it.

>Hello All,
>
>I'm looking for a way to "yield" an exception.
>
>Background: I'm writing a hardware simulator. I have an output buffer
>and need to freeze when it's full and then when called again to resume
>execution from the point where it stopped.
>
>Currently all I can think of is to use a class and save the state when
>throwing an exception. However this required manual book keeping of the
>current state (and it is complicated).
>
>I'd like to use generators but can't see any "nice" way of doing it.
>What I'd like it to throw an exception when the buffer is full and then
>next time the generator is called to continue execution as after a
>"yield".
>
>Is this possible?
>Can you recommend a good way of doing this? Any state machine?
>
>Thanks.
>Bye.
>--
>-------------------------------------------------------------------------
>Miki Tebeka <miki.tebeka at zoran.com>
>http://www.cs.bgu.ac.il/~tebeka
>The only difference between children and adults is the price of the toys.
>
>
>-- 
>http://mail.python.org/mailman/listinfo/python-list
>

= = = = = = = = = = = = = = = = = = = =
			
				 
        BruceKL WhoH
        BruceWhoHKL at gawab.com
          2004-05-21



More information about the Python-list mailing list