Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.chainon-marquant.org!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed6.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.054 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.01; 'python': 0.08; 'listing,': 0.09; 'reply-to:addr:comp.lang.python': 0.09; 'to:addr:comp.lang.python': 0.09; 'api': 0.09; 'gui': 0.13; 'captured': 0.16; 'ncurses': 0.16; 'subject:Single': 0.16; 'subject:key': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.20; 'header:In-Reply-To:1': 0.22; 'wonder': 0.23; 'cc:2**0': 0.24; 'library.': 0.24; 'script': 0.28; 'cc:addr:python.org': 0.29; 'tens': 0.30; 'list': 0.32; 'header :User-Agent:1': 0.33; 'from:addr:googlemail.com': 0.34; 'received:209.85.212': 0.34; 'something': 0.35; 'similar': 0.36; 'but': 0.37; 'received:google.com': 0.37; 'some': 0.38; 'received:209.85': 0.38; 'received:209': 0.40; '2011': 0.61; 'thousands': 0.64; 'header:Reply-To:1': 0.71; 'press': 0.72; 'reply-to:no real name:2**0': 0.72; 'reply- to:addr:googlegroups.com': 0.74; 'slow.': 0.84; 'items,': 0.91; 'received:209.85.212.56': 0.91; 'received:mail- vw0-f56.google.com': 0.91; 'realistic': 0.93 Newsgroups: comp.lang.python Date: Mon, 5 Dec 2011 22:27:48 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=1.168.138.227; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw References: User-Agent: G2/1.0 X-Google-Web-Client: true MIME-Version: 1.0 Subject: Re: Single key press From: 88888 Dihedral To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: comp.lang.python@googlegroups.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323152877 news.xs4all.nl 6933 [2001:888:2000:d::a6]:34522 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16703 On Tuesday, December 6, 2011 1:49:55 PM UTC+8, Sergi Pasoev wrote: > Hi. > > I wonder if it is realistic to get a single key press in Python > without ncurses or > any similar library. In single key press I mean something like j and k > in Gnu less > program, you press the key and and it is captured by the script without need to > press enter afterwards Sounds like the fast key searching for a list in the DOS application in the old days. This is easy in GUI of just tens of items, but for thousands of items such as in a directory listing, some API is really slow.