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


Groups > comp.lang.python > #56680

Process pending Tk events from GObject main loop?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <skipm@trdlnk.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.028
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'received:209.85.223': 0.03; 'tkinter': 0.07; 'subject:pending': 0.09; 'gobject': 0.16; 'loop.': 0.16; 'underlying': 0.16; 'trying': 0.19; 'skip:g 40': 0.19; 'working.': 0.19; 'skip': 0.24; 'looks': 0.24; '(or': 0.24; 'equivalent': 0.26; 'pending': 0.26; 'skip:_ 20': 0.27; 'message- id:@mail.gmail.com': 0.30; "i'd": 0.34; 'subject:from': 0.34; "can't": 0.35; 'received:209.85': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'c++': 0.36; 'event,': 0.36; 'subject:?': 0.36; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'tell': 0.60; 'our': 0.64; 'more': 0.64; 'periodically': 0.68; 'subject:events': 0.84
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:date:message-id:subject:from:to:content-type; bh=YLipDw7PMG77VplXEa0ooYTjU712yJ69FPoSPcFJaVk=; b=cwK3cY6r8J23ObCFmi1AtyVAPF4T3QAOpwplb2xmcX3udqWdiNzZKyWHAKdR2TfPB/ dboMEy1AE4gmH3wKXinF9O8HxD5l5orOYmRizc6LN9Kq6ced18O8zoWVkwaDWXQO0o7A 4IKpMo4Xyi6UAzcPSVHX6id5+N/DUivdnGWkttyIzUtOynz0qaqgoHc0A98ubX2QlEzB 69MDu+FHK7nZgYEBFMfRbJLz6Me2JnTngsJrlM8hUb7Suwe4hGYH/IXFuD5h9ne+KUqZ 7VBVeo3vOp0/eaaHoPcpKUZ3oqlzx3mv0qRhxxwfdZKnEyT3JZAvaJFXOeFgDtjPw23X b1HA==
MIME-Version 1.0
X-Received by 10.42.121.132 with SMTP id j4mr11394816icr.42.1381495920400; Fri, 11 Oct 2013 05:52:00 -0700 (PDT)
Date Fri, 11 Oct 2013 07:52:00 -0500
Subject Process pending Tk events from GObject main loop?
From Skip Montanaro <skipm@trdlnk.com>
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1002.1381496349.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381496349 news.xs4all.nl 15903 [2001:888:2000:d::a6]:46893
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56680

Show key headers only | View raw


I know I have things bassackwards, but trying to process Gtk events
from Tkinter's main loop using after() isn't working. (I suspect our
underlying C++ (ab)use of Gtk may require a Gtk main loop). I'd like
to process Tk events periodically from a GObject main loop. I know I
want to call gobject.idle_add(), but can't find Tkinter equivalent to
gobject.MainLoop().get_context().iteration(). That is, how do you
process a single event (or all pending events)? It looks like
_tkinter.dooneevent() might be the right call to process a single
event, but how do I tell no more events are pending?

Thx,

Skip

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


Thread

Process pending Tk events from GObject main loop? Skip Montanaro <skipm@trdlnk.com> - 2013-10-11 07:52 -0500
  Re: Process pending Tk events from GObject main loop? Christian Gollwitzer <auriocus@gmx.de> - 2013-10-11 21:58 +0200

csiph-web