Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41912
| References | <CAEH=cXUJwMO2d3-65bNofV3srWKqM4PMtc7bWcwGZT6EKQu9nA@mail.gmail.com> <CAJ6cK1Yer0sh5SoVn-EZBN3kr3YA+_yWJWic9s4MTvp4idRhnA@mail.gmail.com> |
|---|---|
| Date | 2013-03-26 15:19 +0000 |
| Subject | Re: Processing user input as it's entered |
| From | Sven <svenito@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3751.1364311206.2939.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On 26 March 2013 14:41, Arnaud Delobelle <arnodel@gmail.com> wrote: > On 26 March 2013 10:07, Sven <svenito@gmail.com> 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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Processing user input as it's entered Sven <svenito@gmail.com> - 2013-03-26 15:19 +0000
csiph-web