tkinter and gtk problem

Michael Torrie torriem at
Sun Sep 28 20:11:57 CEST 2014

On 09/26/2014 12:15 PM, Paula Estrella wrote:
> Hello, we are working on ubuntu 12.04 LTS; we use gtk to take screenshots
> and we added a simple interface to select a file using tkFileDialog but it
> doesn't work; is it possible that tkinter and gtk are incompatible? a test
> script to open a file with tkFileDialog works fine but if we import gtk
> even if we don't use it, the dialog box doesn't respond to mouse events
> anymore; if we comment the import gtk it does work ....
> Anyone knows what might be going on or how to solve that?

Just use the Gtk to show a file dialog box.  As dieter says, you can't
mix event loops easily across multiple platforms.  You might be able to
set up a gtk timer or idle event to pump the tkinter event loop
manually, but that's probably overly complicated and prone to failure.

PyGtk isn't that much harder to learn and work with than tkinter.

More information about the Python-list mailing list