PythonCOM connectableserver

Mark Hammond MarkH at
Fri Mar 16 23:53:30 CET 2001

Masog, David wrote:

> I've used win32com\demos\ as a starting point, but I'm trying
> to write the connectable client portion in VC++ rather than Python.
> When I comment out the line containing the self._BroadcastNotify the
> script executes successfully(I made it return a value to the client).
> When I leave the _BroadcastNotify line in I successfully catch the fired
> event, but immedately afterward receive:
> 	Fatal Python error: PyEval_ReleaseThread: wrong thread state
> I have seen some postings that refer to similar thread issues calling
> Python callbacks from C but don't know how this would apply in this
> case.
> Could someone please shed some light on this issue or direct me towards
> a different approach?

Do you get this error with the sample, or only once you have modified it.

My guess is that you are implementing the other side yourself, and that 
then tries to use Python.  This code is probably not managing the thread 
state correctly.

I can't be more specific as I dont have more specific information about 
the problem.


More information about the Python-list mailing list