<[EMAIL PROTECTED]> wrote: > I fixed the code. This code snippet runs in a seperate thread: > > > PyObject *dict=NULL; > PyGILState_STATE state = PyGILState_Ensure(); > dict = CreateMyGlobalDictionary(); > > PyRun_String(<my code>, Py_file_input, dict, dict); > > ReleaseGlobalDictionary(dict); > > But it still does not work... :-/
Have you initialize interpreter with PyEval_InitThreads? look at http://www.python.org/doc/1.5.2/api/threads.html for more information. Oh, btw... I did use python in a bit different scenario than you've described. Since you attempt to run different script per-host thread, you might need python multiple interpreter support, I suggest you take a look mod_python implementation. Salam, -Jaimy. -- http://mail.python.org/mailman/listinfo/python-list