PyImport_ImportModule deadlocks
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Fri Aug 29 06:16:57 EDT 2008
En Thu, 28 Aug 2008 11:22:50 -0300, jms at bughunter.ca
<justin.seitz at gmail.com> escribi�:
> I have an embedded Python shell and everything works fine, however, in
> my stdout catcher (in C to grab tracebacks) for some reason when I do
> a :
>
> PyImport_ImportModule( "sys" )
>
> It deadlocks the process, is there a need for me to acquire locks
> inside of my stdout catching function before calling that import?
The deadlock might be due to the import lock. But instead of analyzing
that issue: why do you want to import sys? The sys module is always
available. To access its attributes, use PySys_GetObject &Co.
--
Gabriel Genellina
More information about the Python-list
mailing list