Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78406

Re: tkinter and gtk problem

From dieter <dieter@handshake.de>
Subject Re: tkinter and gtk problem
Date 2014-09-27 09:33 +0200
References <CAONa_HZMQRY4eKX43d6vtEQanAvqkk_TFZ=wYsHGjoBrpumqtQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14419.1411803197.18130.python-list@python.org> (permalink)

Show all headers | View raw


Paula Estrella <pestrella@gmail.com> writes:

> 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 ....

UI toolkits (like "tk" and "gtk") usually use a so called event loop
which gets information about user interaction events
(e.g. keyboard/mouse events) and dispatches appropriate application callbacks.

When you use two (or more) such toolkits in the same application,
you need a special event loop which multiplexes the events
to the various toolkits.

The implementation of such a multiplexing event loop might
be difficult (and likely will be dependent on the UI toolkits
to be integrated). Therefore, if possible, try to avoid
combining multiple UI toolkits in the same application.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: tkinter and gtk problem dieter <dieter@handshake.de> - 2014-09-27 09:33 +0200

csiph-web