Fatal Python error: Interpreter not initialized (version mismatch?)

Mark Hammond MarkH at ActiveState.com
Tue Jan 30 17:36:10 EST 2001


Dan Parisien wrote:

> Dan Parisien wrote:
> 
> I have more info. It is a thread problem. The program is a socket server 
> with a custom crypto module. I launch a thread to start the main loop to 


This is pretty complicated!  The best I can do is point you at the 
CEnterLeavePython class in the Win32 extensions.  Check out 
pywintypesmodule.cpp and pywintypes.h - these can be accessed via CVS - 
instructions at http://starship.python.net/crew/mhammond/cvs.html

This is obviously windows only, and will have some trouble porting to 
Linux due to the lack of portable Thread Local Storage (TLS).  The 
PyXPCOM extensions have a more portable implementation, but it uses the 
Netscape Portable Runtime (NSPR) for TLS, so probably isnt what you want.

Hope this helps...

Mark.




More information about the Python-list mailing list