Re: Py_NewInterpreter(), is this a bug in the python core?

2006-07-13 Thread freesteel
freesteel wrote: > Yes, I see that now in the documentation, which to me is quite > confusing. > So, how do you use python in a multithreaded environment, where for > example you want to run some embeded python code from a number of > different C threads? > &g

Re: Py_NewInterpreter(), is this a bug in the python core?

2006-07-10 Thread freesteel
Yes, I see that now in the documentation, which to me is quite confusing. So, how do you use python in a multithreaded environment, where for example you want to run some embeded python code from a number of different C threads? This article: http://www.linuxjournal.com/article/3641 is quite good,

Re: multithreading windows and embedding python

2006-07-10 Thread freesteel
freesteel wrote: ... > pThread[ih] = AfxBeginThread(MyThread, mainThreadState, > THREAD_PRIORITY_NORMAL, CREATE_SUSPENDED); ... Here the call to AfxBeginThread is wrong, there is one argument missing, it should be: pThread[ih] = AfxBeginThread(MyThread, mainThrea

Py_NewInterpreter(), is this a bug in the python core?

2006-07-10 Thread freesteel
/* Is this a bug in Py_NewInterpreter? The function below "MyThread" is instantiated from a windows worker thread, but I don't think that is relevant. (I can try this on a linux box, but I would have to compile a python library with debugging enabled.) The following code fragment throws an except

multithreading windows and embedding python

2006-06-19 Thread freesteel
I have posted about this problem before. SInce then I found a much better article to help with embedding python in a multithreaded application: http://www.linuxjournal.com/article/3641 I found this article very good and it clarified for me what needs doing. Now I have an example application that

embedded python and windows multi threading, can't get it to work

2006-06-13 Thread freesteel
I am trying to run a python programme embedded from C++. I want to run the same python code concurrently in several threads. I read the manual on embedding, especially chapter 8, and searched for relevant info on google all afternoon, but I can't get this to work. What am I doing wrong? I use pytho