Re: embedding: forcing an interpreter to end

2004-12-27 Thread Peter Hansen
dan charnitsky wrote: I wish (hope) Python will move in that direction along with scaling down more easily for embedded use. That won't happen if you just wait for the existing development team to do it (nor even if you ask them, I suspect), as this is likely of little interest to any of them. Onl

Re: embedding: forcing an interpreter to end

2004-12-26 Thread dan charnitsky
>> I may need to reconsider if Python is appropriate; >> the other possibiities are javascript or lua. > Lisp/Scheme? > (See http://tinyscheme.sourceforge.net/download.html Thanks for the pointer. After some preliminary evaluation, I'll probably try to move forward prototyping with Lua. I't look

Re: embedding: forcing an interpreter to end

2004-12-22 Thread Peter Hansen
[EMAIL PROTECTED] wrote: Well, the app is multi-threaded, so I do have a big issue getting control back to my C program. I just can not seem to cleanly stop the interpreter. The best I could do is: void terminateInterpreter( PyInterpreterState *interp ) [...] PyThreadState_SetAsyncExc(interp->tst

Re: embedding: forcing an interpreter to end

2004-12-22 Thread Miki Tebeka
Hello pdectm, > > You have a Python port to uClinux? > > Nope, not yet. That would have been my next post :-) I thought there > would have been much more work on cross-compiling and porting Python. The problem is with Python's build proces, it 1'st created pgen and then use it for the next stag

Re: embedding: forcing an interpreter to end

2004-12-21 Thread pdectm
> Is there any signal handler you can use in your C program? Maybe signling > yourself will get the control back to the C program and then you can kill > the interpreter. Well, the app is multi-threaded, so I do have a big issue getting control back to my C program. I just can not seem to cleanly

Re: embedding: forcing an interpreter to end

2004-12-20 Thread Miki Tebeka
Hello dan, > > How about: PyRun_String("from os import _exit; > > _exit(0)") ? > > Clever! But, _exit() will terminate my entire > process, not just the offending interpreter. And I > can't use a separate child process on uclinux. You have a Python port to uClinux? > Any other ideas? 1. Maybe

Re: embedding: forcing an interpreter to end

2004-12-20 Thread Diez B. Roggisch
Hi, > I've googled my heart out and reread the threading API countless times. > Any suggest or hints would be greatly appreciated. You might have used the wrong keywords - the subject of killable threads comes up every month once or twice, and usually is discussed to some length. There exist some

embedding: forcing an interpreter to end

2004-12-19 Thread pdectm
I'm trying to prototype an application which runs multiple python scripts, each in its own interpreter and OS thread. I've not been able to forceable stop a script which does not respond to a request to stop. My thought was to simply call: PyThreadState_Clear(xxx); PyThreadState_Delete(xxx); //