Re: Processing user input as it's entered

Discussion in 'Python' started by Sven, Mar 26, 2013.

  1. Sven

    Sven Guest

    On 26 March 2013 14:41, Arnaud Delobelle <> wrote:

    > On 26 March 2013 10:07, Sven <> wrote:
    > > 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.

    >
    > Can you use curses (http://docs.python.org/2/library/curses.html





    This could work. I've not used it before so I am having some issues echoing
    out the text. I assume I can use this without having to create an ncurses
    UI?

    --
    ../Sven
     
    Sven, Mar 26, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TN Bella
    Replies:
    1
    Views:
    1,532
    TN Bella
    Jul 1, 2004
  2. Ian M. Asaff

    last-input entered on command line

    Ian M. Asaff, Nov 25, 2010, in forum: Ruby
    Replies:
    0
    Views:
    116
    Ian M. Asaff
    Nov 25, 2010
  3. Luke Matuszewski
    Replies:
    8
    Views:
    142
    Luke Matuszewski
    Apr 22, 2006
  4. Sven
    Replies:
    0
    Views:
    96
  5. Arnaud Delobelle

    Re: Processing user input as it's entered

    Arnaud Delobelle, Mar 26, 2013, in forum: Python
    Replies:
    0
    Views:
    95
    Arnaud Delobelle
    Mar 26, 2013
Loading...

Share This Page