Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.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.065 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'string.': 0.05; 'responding': 0.07; 'windows': 0.15; 'displaying': 0.16; 'subject:Not': 0.16; 'prevent': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'file,': 0.19; '(or': 0.24; 'equivalent': 0.26; 'header:In- Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'open': 0.33; 'framework': 0.33; 'subject:with': 0.35; 'basic': 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'hi,': 0.36; 'displays': 0.38; 'window': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'simple': 0.61; "you're": 0.61; 'love': 0.65; 'close': 0.67; 'believe': 0.68; 'periodically': 0.68; '"not': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=TDZuasPg4KcRoC8g3egEB9CLhN2pZlLir+snZBpdMR4=; b=mwBFo2S0v6VcsLiujS0qPjc8IbIqnvrzaDpcmYAax0ECjYmxYz6iHySAv+h/KTwRUG abPi6hpHKnUonsq2XLLv8oTZH1682y5FnGQuhgrVBDs3Ts7jjO3dr+j3x0SHLpcDm7qU Tvvh9E8IxhSWo53ge2hLX4mMkJD5Vbn6Clkaz7S/xO3ccLY5WsRx7KabeUdcYm9nBto0 7iQPFOPce8BEtSboSpmYkTLtlmgAFp+QNQdzK80pr+vfb3M7CE8uwL9yIpa2XBfpcaid VuM0oc3mQBkL78nvHiBdO50V6qww9Spvr6rmbTnZKed1FKysmyuNQANNL9J3lDV3ihR9 pX5w== X-Received: by 10.236.154.136 with SMTP id h8mr1611573yhk.105.1403132826858; Wed, 18 Jun 2014 16:07:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1abc3e5d-8002-4ecc-b433-a862c4918e74@googlegroups.com> References: <00d330e3-fc8a-4b7e-b2bd-f1a48bc335c1@googlegroups.com> <1abc3e5d-8002-4ecc-b433-a862c4918e74@googlegroups.com> From: Ian Kelly Date: Wed, 18 Jun 2014 17:06:26 -0600 Subject: Re: Not Responding When Dealing with Large Data To: Python 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1403134519 news.xs4all.nl 2955 [2001:888:2000:d::a6]:44921 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73387 On Wed, Jun 18, 2014 at 4:32 PM, cutey Love wrote: > Hi, thanks for the replies, > > I mean windows displays "Not responding close the program now" > > How can I do it asynconistrically? > > It's simple code just open file, loop through line by line and do some comparons with the string. If all you want is to prevent Windows from displaying that message then I believe all you need to do is periodically call frame.update_idletasks() (or the equivalent if you're using some framework other than tkinter) so that the basic window events will get processed.