User interaction in a twisted process

I start a twisted process that should interact with the user, without blocking. The idea is that the user will be asked to enter some data, and after the full line is entered, the program will process it, ultimately triggering events. During the period when the user enters data, the reactor should continue to operate normally.

Is there any twisted support for this?

+1
python twisted
source share
1 answer

You can read standard input using twisted.internet.stdio . See Stdiodemo.py and stdin.py at http://twistedmatrix.com/documents/current/core/examples/ .

You can also use Gtk using twisted.internet.gtk2reactor . See the pbgtk2.py example on the same example page.

You can also use other GUI tools, although Gtk is most well supported.

+1
source share

All Articles