Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; '16,': 0.03; 'apps,': 0.07; 'c++,': 0.07; 'iterate': 0.09; 'will,': 0.09; 'cc:addr:python- list': 0.11; 'gui': 0.12; 'windows': 0.15; 'c++.': 0.16; 'compiler.': 0.16; 'dig': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'maintainable': 0.16; 'subject: \n ': 0.16; 'subject:GUI': 0.16; 'subject:programming': 0.16; 'wxpython': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'app': 0.19; 'server,': 0.19; 'user.': 0.19; 'meant': 0.20; 'written': 0.21; 'example': 0.22; 'coding': 0.22; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'visible': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'compiled': 0.26; 'second': 0.26; 'header:In-Reply-To:1': 0.27; '(this': 0.29; '(like': 0.30; 'dec': 0.30; 'relative': 0.30; 'said,': 0.30; 'subject:please': 0.30; 'message-id:@mail.gmail.com': 0.30; 'program,': 0.31; 'code': 0.31; 'coded': 0.31; 'crash': 0.31; 'quite': 0.32; 'running': 0.33; 'core': 0.34; 'problem': 0.35; 'except': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'c++': 0.36; 'similar': 0.36; 'wrong': 0.37; 'application': 0.37; 'list': 0.37; 'easily': 0.37; 'performance': 0.37; 'needed': 0.38; 'pm,': 0.38; 'recent': 0.39; 'does': 0.39; 'itself': 0.39; 'how': 0.40; 'life,': 0.60; 'most': 0.60; 'impact': 0.61; 'new': 0.61; 'entire': 0.61; "you're": 0.61; 'back': 0.62; 'times': 0.62; 'protection': 0.63; 'more': 0.64; 'taking': 0.65; 'between': 0.67; 'believe': 0.68; 'battery': 0.84; 'absolutely': 0.87; 'pc,': 0.91; 'subject:want': 0.91; 'thing,': 0.91; 'to:none': 0.92; 'anywhere,': 0.93; 'subject:answer': 0.95; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=+F3arYNHkL+OiP76osjFuoUmgJN6d9HxTKdYGNWp8iU=; b=iAG+tw9khORbS89CS54ov9SwO+0OkYBbJqLGMIFcevG8P37KO5uPw/E3gpPYXqmpwu iYWzfFrK9uFTnMmJjgbI5nTc1wooFAfIMsf0hlovwfLULD/4QJ8gXgp0KIqvMm3TqZQl 2TktINmRqJyW8RI6ekH98prw9TmZidxyJWFbBWhLdh6F0AXeUufq0MH/sF0ajO3UhSsE ejsM/2Rpk1r5wjccDPdGAUFiS2ComhSbmNS9QXT1IO72KOdm/FUTVg4sMRWw4lXObIbi sQ5zKbdPZkiRTT6XSCP+OKqDP3WJ72Z/fK37pnAyKF0ds68Vmnflq+mJd//VB35uUkJo 3yUg== MIME-Version: 1.0 X-Received: by 10.68.196.193 with SMTP id io1mr18112391pbc.46.1387169878195; Sun, 15 Dec 2013 20:57:58 -0800 (PST) In-Reply-To: <52AE7D0B.7070601@arcor.de> References: <9f5d28ce-504d-40db-baa2-ff3699ab05c7@googlegroups.com> <52AE4A86.8040402@arcor.de> <52AE7D0B.7070601@arcor.de> Date: Mon, 16 Dec 2013 15:57:58 +1100 Subject: Re: GUI:-please answer want to learn GUI programming in python , how should i proceed. From: Chris Angelico Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387170198 news.xs4all.nl 2886 [2001:888:2000:d::a6]:55021 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62002 On Mon, Dec 16, 2013 at 3:09 PM, Tamer Higazi wrote: > I also believe in performance. An application written in C++, can be > compiled easily on the target platform (like on windows systems) with it's > native compiler. > How would it be with wxPython ?! It's going to spend more than 99% of its time waiting for the user. Most applications aren't performance-bound. Over the past few years, I can think of *one* case when my GUI program was actually saturating a CPU core and I had to dig into a performance fault; the simplistic design had meant that it would iterate over an entire list of strings to find which ones it needed to draw, and once that list got huge, the redraw operation started taking time. But there was no visible problem except when the app was redrawing itself many times a second in response to user action AND the set of strings got, as I said, huge. Every other part of that program, and all of every other GUI interactive program I've written in recent years, has been coded for simplicity and not for performance. (This particular example is actually quite pertinent, as it's the "designated replacement" for a very similar program written in C++. The C++ one has a tendency to crash hard if user code does the wrong thing, as there is absolutely no protection anywhere, while the new code will, at very worst, spew a traceback and then go back to processing events.) Of course, performance is a relative thing. If you're running on a PC, there's no difference at all between taking 1ms and taking 2ms - no human will notice. But if you're running on a server, that's the difference between 1000tps and 500tps. And on a phone, that CPU usage might have an impact on battery life, and running on a tiny PCB the same coding difference might be the difference between 400ms and 800ms. But in the day-to-day realm of desktop apps, maintainable code will always be better than marginally faster code. ChrisA