[C++-sig] Opening up a main window asynchronously

François Duranleau duranlef at iro.umontreal.ca
Thu Sep 20 17:46:22 CEST 2007

On Thu, 20 Sep 2007, Gazihan Alankus wrote:

> I know that 4 would work for sure and 3 will probably work, but I really
> would love a solution like 1, or maybe 2. Any eperienced C++/Python hybrid
> developers that can lead me in the right direction?

I use option 5: Tkinter. When the interpreter is idle, Tkinter processes 
events. With that, you have no thread problems at all. Caveats:
- after you run a command, until it returns, the GUI is blocked
- I am not sure if this behaviour is portable (IIRC, there were some
   comments on that in Tkinter's source code)
- it's Tk..., although if you are really motivated, you could take a look
   at Tkinter's source code and see how they do it and port it to another
   GUI toolkit

I tried 2, but it was a pain to always make sure that the calls to the 
GUI's API and, in my case, OpenGL, where done in the thread owning it, and 
I didn't really have enough time to do development further in that 
direction. Since I was happy with Tk, I opted for 5.

I would take a look at IPython pointed out by Hans Meine. It looks very 

Francois Duranleau

More information about the Cplusplus-sig mailing list