Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.067 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'python': 0.11; '2.7': 0.14; 'cli': 0.16; 'subject:user': 0.16; 'finished': 0.19; 'entered': 0.20; 'input': 0.22; "i've": 0.25; 'characters': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'text': 0.33; 'up.': 0.33; 'to:name:python-list': 0.33; 'display': 0.35; 'tool': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'thanks': 0.36; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'information': 0.63; 'wiring': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=rICMqYdQIEk/r4ltbj+VYv/ssdSOa6iMFC37vWE5H2U=; b=go3tF26yr+U+KZNGv4fjDKD8YWqr44guFIlWwa1HP9i9oATwSU2nf38h7NDT03/zYs R+a4cIY3MqQkSwmaRy/HBd0kukxZNkXc51HjEwLYnX06C0HkEUcvbLI9SwXuZCAtPZIL cKeXTlPfHCA12pMQRiU8K2xLUFnpq0nV/Q9MHCCzb58FNrB+3hbFdQ+W71pmUyjSk3O+ 3xga0y5xT3Gn1rHu8aWNAZVPXIkkEHidF4VFAc7tVm6Idi10rkF7fTvSTqAlzueAnA5l cnKeWwuY7ynVtm6vtqYMIEf65NzpX7NyL2SprGswOTZOpdHq4Ewpd/2+bFUmvBF1qoWf PTAw== MIME-Version: 1.0 X-Received: by 10.194.71.110 with SMTP id t14mr23346608wju.53.1364292420750; Tue, 26 Mar 2013 03:07:00 -0700 (PDT) Date: Tue, 26 Mar 2013 10:07:00 +0000 Subject: Processing user input as it's entered From: Sven To: python-list Content-Type: multipart/alternative; boundary=047d7bfd0bd61bd3a204d8d11569 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: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364292426 news.xs4all.nl 6845 [2001:888:2000:d::a6]:34210 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41869 --047d7bfd0bd61bd3a204d8d11569 Content-Type: text/plain; charset=ISO-8859-1 Hello, Is there a way (ideally cross platform but a *nix OS solution would be great) to process user input as they type? What I aim to achieve is to count the number of characters a user has entered and display it while they are typing. The entered text will also need to be captured once the user has finished typing. This is a gui-less CLI tool for python 2.7 I've seen some information on tty.setraw but I'm not sure how you'd go about wiring that up. Thanks -- ./Sven --047d7bfd0bd61bd3a204d8d11569 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello,

Is there a way (ideally cross pl= atform but a *nix OS solution would be great) to process user input as they= type?
What I aim to achieve is to count the number of characters= a user has entered and display it while they are typing. The entered text = will also need to be captured once the user has finished typing.

This is a gui-less CLI tool for python 2.7

I've seen some information on tty.setraw but I&#= 39;m not sure how you'd go about wiring that up.

Thanks

--
./Sven
--047d7bfd0bd61bd3a204d8d11569--