InteractiveConsole executed in another thread.

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Oct 21 05:50:55 CEST 2009


En Tue, 20 Oct 2009 07:02:29 -0300, Germán Diago <germandiago at gmail.com>
escribió:

> Hello. I have an application written in python (it's a wrapper for a
> c++ application).
>
> The application has : a window (an SDL window), and a GUI, which has
> the window embedded inside.
>
> I would like to use InteractiveConsole to send commands to the SDL  
> window.
>
> I have an API that allows me to do this, but when trying to put
> InteractiveConsole in another thread,
> my program gets blocked at that point.

I always had problems when raw_input is not run in the main thread; but
your main thread is running the GUI event loop, I presume.
I'd use a separate process for the console, sending back and forth input
and output to the original process.

-- 
Gabriel Genellina




More information about the Python-list mailing list