Thomas Heller <theller at python.net> writes: > Storing the thread state in a global variable would be possible, but > in this case it wouldn't be thread safe, I assume, and *only* work if > the callout into C is done by my extension module. On platforms supporting it, you could also save it in a thread-local variable. Regards, Martin