Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'infinite': 0.07; 'called.': 0.09; 'loop.': 0.09; 'to:name:python mailing list': 0.09; 'url:github': 0.09; 'def': 0.15; 'argument': 0.15; 'case.': 0.15; 'atexit': 0.16; 'patch,': 0.16; 'wrote:': 0.16; 'wed,': 0.17; 'thanks,': 0.18; 'modified': 0.18; 'trying': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'variable': 0.24; 'aug': 0.24; "i'm": 0.27; 'code,': 0.28; 'modify': 0.28; 'problem': 0.28; 'url:mailman': 0.28; 'message- id:@mail.gmail.com': 0.29; 'updated': 0.29; 'subject:time': 0.30; 'parent': 0.30; 'sun,': 0.30; 'version': 0.32; 'hi,': 0.32; 'comment': 0.32; 'there': 0.33; 'to:addr:python-list': 0.33; 'url:listinfo': 0.33; 'however,': 0.34; 'someone': 0.34; '17,': 0.34; 'flag': 0.34; 'url:python': 0.36; 'thread': 0.37; 'passed': 0.37; 'put': 0.37; 'something': 0.37; 'could': 0.38; 'think': 0.38; 'received:google.com': 0.38; 'registered': 0.38; 'url:org': 0.38; 'received:209.85': 0.38; 'should': 0.38; 'subject:: ': 0.39; 'help': 0.39; 'to:addr:python.org': 0.39; 'might': 0.40; 'below': 0.62; 'periodically': 0.67; 'correctly?': 0.84; 'solved.': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=Mb9ETU76qes6Dp6ld4dWyjsb7yRAt5/hEwmNppb9TgM=; b=GsNYSG0LGBCXdRtGwj0L3oI8PWFnHAqG9y6N2Cw0/G979pE5Zb44a9FgeNZkNeYwna 6kFSGtgLO/hWUvl6wd4ApFCETezz+FH2OmDLDg6VSMQq4kXdPTtvKwoh4nyfMNpaTObr 4rpOfp28xPQF3bmN/C6F294UA5JdY5dbUFuZo= MIME-Version: 1.0 In-Reply-To: <6e7d17a8-d5aa-4755-9bd4-09c09bed5c03@o26g2000vbi.googlegroups.com> References: <6e7d17a8-d5aa-4755-9bd4-09c09bed5c03@o26g2000vbi.googlegroups.com> From: Jabba Laci Date: Wed, 17 Aug 2011 17:20:52 +0200 Subject: Re: monitor mouse coordinates in real-time To: Python mailing list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 53 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1313594477 news.xs4all.nl 23899 [2001:888:2000:d::a6]:50025 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11688 Hi, Thanks, the problem got solved. The updated version can be found at https://gist.github.com/1144708 in a comment below the original post. Solution: self.connect("destroy", self.quit) def quit(self, widget): self.mouseThread.kill() gtk.main_quit() It was not evident that quit() must be passed the argument "widget" too. Thanks, Laszlo On Wed, Aug 17, 2011 at 16:48, MrJean1 wrote: > Check that the app.quit method registered with atexit is called. =A0E.g. > on Windows, that may not be the case. > > /JeAN > > > On Aug 14, 9:39=A0am, Jabba Laci wrote: >> I'm trying something similar. In the thread there is a variable which >> is modified by the parent. However, the thread doesn't quit the >> infinite loop. If someone could provide a patch, that'd be really >> useful. >> >> Thanks, >> >> Laszlo >> >> >> On Sun, Aug 14, 2011 at 13:00, TheSaint wrote: >> > Jabba Laci wrote: >> >> >> Could you please help me out how to close the application correctly? >> >> > I think you should put a flag into the code, which the parent might mo= dify >> > it, so it will tell the child process to quit. >> > Then the flag should need to be read periodically to know whether is t= ime to >> > quit. >> >> > -- >> >http://mail.python.org/mailman/listinfo/python-list > >