LionHeart123 / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Stop execution without resetting the interpreter #618

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In principle one can use the reinitialize command (Run, Python Engine, 
Reinitialize) to interrupt the interpreter but this not only stops execution 
but resets the interpreter entirely. That means it forgets everything including 
the current directory, code loaded, variable asignments and so on.

For testing purposes it is useful to build up an environment in the 
interpreter and test individual functions. If for some reason the 
interpreter hangs (gets in an infinite loop, test data is too big to process 
and one gets bored waiting...) it is a nuisance to lose context when resetting 
the interpreter. 

Original issue reported on code.google.com by patric...@gmx.de on 6 Mar 2012 at 7:39

GoogleCodeExporter commented 9 years ago
I managed to get a way to raise a Keyboard interrupt to at the remote 
interpreter utilizing Windows calls without incurring overheads.

So Reinitializing the Remote engine is no longer necessary for stopping an 
infinitely looping script.  You just need to press the Abort button.

Original comment by pyscripter on 10 Mar 2012 at 12:11