Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.024 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'that?': 0.05; 'mouse': 0.07; 'tkinter': 0.07; 'failure.': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'loops': 0.16; 'screenshots': 0.16; 'tkinter.': 0.16; 'wrote:': 0.18; 'select': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'subject:problem': 0.24; 'fine': 0.24; 'script': 0.25; 'header:In- Reply-To:1': 0.27; "doesn't": 0.30; 'mix': 0.30; 'dialog': 0.31; 'anyone': 0.31; 'file': 0.32; 'probably': 0.32; 'interface': 0.32; 'open': 0.33; 'comment': 0.34; "can't": 0.35; 'knows': 0.35; 'test': 0.35; 'but': 0.35; 'idle': 0.36; 'ubuntu': 0.36; 'possible': 0.36; 'easily': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'even': 0.60; 'solve': 0.60; 'simple': 0.61; 'show': 0.63; 'pump': 0.84; 'prone': 0.91 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Sun, 28 Sep 2014 12:11:57 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: tkinter and gtk problem References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1411927924 news.xs4all.nl 2880 [2001:888:2000:d::a6]:47802 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78438 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.