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


Groups > comp.lang.python > #99658

Re: python response slow when running external DLL

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Laura Creighton <lac@openend.se>
Newsgroups comp.lang.python
Subject Re: python response slow when running external DLL
Date Sat, 28 Nov 2015 11:51:55 +0100
Lines 16
Message-ID <mailman.185.1448707926.20593.python-list@python.org> (permalink)
References <dc290806-c537-4546-b802-88dff14d81c0@googlegroups.com> <mailman.169.1448615930.20593.python-list@python.org> <f4cf8b4f-94e7-4d97-b144-65f59c20fbc1@googlegroups.com> <mailman.173.1448626828.20593.python-list@python.org> <d6c59a36-38ba-4f26-b949-18f2b226e7e3@googlegroups.com> <n3buoh$3r1$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
X-Trace news.uni-berlin.de 9eohFmF/hQ/do0KFwwx4PwkHhKyCW1FBvIB9lpCxus6A==
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'line:': 0.07; 'purpose.': 0.07; 'cc:addr:python-list': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'thread': 0.10; 'python': 0.10; 'subject:python': 0.14; '"while': 0.16; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'constructs': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'logical.': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'recipe': 0.16; 'subject:slow': 0.16; 'subject:when': 0.16; 'threading': 0.16; 'to:addr:web.de': 0.16; 'wrote:': 0.16; 'obviously': 0.16; 'laura': 0.18; '2015': 0.20; 'cc:addr:python.org': 0.20; 'preferred': 0.20; 'cc:2**1': 0.22; 'sat,': 0.23; 'import': 0.24; 'thus': 0.24; 'module': 0.25; 'sense': 0.26; 'module.': 0.27; 'interface': 0.29; 'received:se': 0.29; 'thread,': 0.29; 'cc:no real name:2**1': 0.29; 'code': 0.30; 'nov': 0.35; 'level': 0.35; 'should': 0.36; '(and': 0.36; 'subject:: ': 0.37; 'charset:us- ascii': 0.37; 'why': 0.39; 'your': 0.60; 'header:Message-Id:1': 0.61; 'replying': 0.61; 'more': 0.63; 'reply': 0.68; 'saw': 0.77; 'low': 0.83; 'header:In-reply-to:1': 0.84; 'otten': 0.84; 'mistake': 0.91; 'scheduling': 0.91; 'subject:response': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=openend.se; s=default; t=1448707921; bh=lcnUM53sMywS0NjydvwkvSxde9BzvvrmWdSGDeG6TQM=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=sU52nvk7cuX6iJBPsTuQLr73EpNBB2yP1ePBL5QD2E6lmvwnqePU9ySc8lUXaEb0t zNj8LAZqVK4rkOduGBhGbaM8VTrtJFVguXSFcJXvpzvRPnt2hhVWAFCP+gkAywxsK0 K+QEljz1La2xuGaVB0s+YiJss7O5fy5VygjKPmZ0=
In-reply-to <n3buoh$3r1$1@ger.gmane.org>
Comments In-reply-to Peter Otten <__peter__@web.de> message dated "Sat, 28 Nov 2015 11:13:38 +0100."
Content-ID <16623.1448707915.1@fido>
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Sat, 28 Nov 2015 11:52:01 +0100 (CET)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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>
Xref csiph.com comp.lang.python:99658

Show key headers only | View raw


In a message of Sat, 28 Nov 2015 11:13:38 +0100, Peter Otten writes:
>jfong@ms4.hinet.net wrote:
>> Using thread is obviously more logical. I think my mistake was the "while
>> busy:  pass" loop which makes no sense because it blocks the main thread,
>> just as the time.sleep() does. That's why in your link (and Laura's too)
>> the widget.after() scheduling was used for this purpose.

I never saw the reply that Peter is replying to.
The threading module constructs a higher level interface on top of the
low level thread module.  Thus it is the preferred way to go for
standard Python code -- and even Fredrik's recipe contains the
line:
	import thread # should use the threading module instead!

Laura

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


Thread

python response slow when running external DLL jfong@ms4.hinet.net - 2015-11-26 23:51 -0800
  Re: python response slow when running external DLL Peter Otten <__peter__@web.de> - 2015-11-27 10:18 +0100
    Re: python response slow when running external DLL jfong@ms4.hinet.net - 2015-11-27 03:14 -0800
      Re: python response slow when running external DLL Peter Otten <__peter__@web.de> - 2015-11-27 13:20 +0100
        Re: python response slow when running external DLL jfong@ms4.hinet.net - 2015-11-27 23:37 -0800
          Re: python response slow when running external DLL Peter Otten <__peter__@web.de> - 2015-11-28 11:13 +0100
            Re: python response slow when running external DLL jfong@ms4.hinet.net - 2015-11-28 18:55 -0800
              Re: python response slow when running external DLL jfong@ms4.hinet.net - 2015-11-30 17:03 -0800
              Re: python response slow when running external DLL Peter Otten <__peter__@web.de> - 2015-12-01 12:01 +0100
                Re: python response slow when running external DLL jfong@ms4.hinet.net - 2015-12-01 19:58 -0800
          Re: python response slow when running external DLL Laura Creighton <lac@openend.se> - 2015-11-28 11:51 +0100
            Re: python response slow when running external DLL jfong@ms4.hinet.net - 2015-11-28 19:04 -0800
      Re: python response slow when running external DLL Laura Creighton <lac@openend.se> - 2015-11-27 13:49 +0100

csiph-web