Embedded Python - Blocking Python Function

andy at britishideas.com andy at britishideas.com
Thu Nov 15 20:18:45 CET 2007


On Nov 15, 9:43 am, a... at britishideas.com wrote:
> On Nov 14, 4:20 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> wrote:
>
> > Not forcibly - you need some cooperation from the Main function. Maybe
> > setting a global variable that Main checks periodically.
>
> Thanks. I'll give that a try!
>
> Andy

It works but the problem is that the script will be written by the end
user. If they make a mistake and the cancel flag isn't perodically
checked then it seems I have no way of cleanly ending the interpreter.
If I wait for a specific time after requesting the Main function stop
I need to be able to kill the interpreter without a runtime error. Any
ideas?

Andy



More information about the Python-list mailing list