Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!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.077 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'url:activestate': 0.09; 'python': 0.11; 'portable': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'everyone,': 0.19; 'programming': 0.22; 'header :User-Agent:1': 0.23; 'equivalent': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'external': 0.29; 'url:code': 0.29; 'errors': 0.30; "i'm": 0.30; 'breaking': 0.31; 'controlled': 0.31; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'monday': 0.35; 'received:google.com': 0.35; 'received:209': 0.37; 'message- id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'hardware': 0.61; 'content- disposition:inline': 0.62; 'header:Message-Id:1': 0.63; 'url:search': 0.81; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id; bh=TZQKDu3klkuSyFMEbisjvn1PCuohMXOEJvOCpQOrP5M=; b=OIZQBdCUziH3AHO4kTZ/ukkct0t46ES0ibxpFy5dKnSXSQrEmy7kiBs4dYVb+fXamI kW4b1Hse0zDvIDFeLE9blKXxH8nXvLxlSf8uBOfg0G1E4cpOW0SuXIYlT+LpvVGcmusF qOUYzBf0WRwvNVUg3DfzH2fmxXzLg49XjxMslk8Jm/x5NrfpPEaYlJQjkf+rDB8U4FqF 2kclLbADzr/hNjzQlbVH/ezYwh/Eu8jY7CO+YEwrzzJDHdt+y/f1ZQ/WlOL+kuHqCcnH gsM8hra6zaxbGMI/kBf/njyPSq7pNV6tntI2MZSAN5eL6oFUVNYmEGOkq2Oq/wW9AqCQ Gmgg== X-Received: by 10.67.10.228 with SMTP id ed4mr65386188pad.41.1367330853326; Tue, 30 Apr 2013 07:07:33 -0700 (PDT) From: xDog Walker To: python-list@python.org Subject: Re: kbhit/getch python equivalent Date: Tue, 30 Apr 2013 07:06:34 -0700 User-Agent: KMail/1.9.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367330862 news.xs4all.nl 16007 [2001:888:2000:d::a6]:45309 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44542 On Monday 2013 April 22 06:34, alb wrote: > Hi everyone, > > I'm looking for a kbhit/getch equivalent in python in order to be able > to stop my inner loop in a controlled way (communication with external > hardware is involved and breaking it abruptly may cause unwanted errors > on the protocol). > > I'm programming on *nix systems, no need to be portable on Windows. http://code.activestate.com/search/recipes/#q=getch -- Yonder nor sorghum stenches shut ladle gulls stopper torque wet strainers.