Re: Processing user input as it's entered
On 26 March 2013 14:41, Arnaud Delobelle <email@example.com> wrote:
> On 26 March 2013 10:07, Sven <firstname.lastname@example.org> 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
> > 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
|All times are GMT. The time now is 06:54 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.