Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard input using stdio.StandardIO in twisted python

I have a doubt in twisted python related to my multiclient chat server program.

that is, when we give input from keyboard using stdio.StandardIO, where it is stored when we run the reactor? Can anybody give me the answer, please..

like image 510
Suruchi Avatar asked Nov 28 '11 17:11

Suruchi


1 Answers

twisted.internet.stdio.StandardIO doesn't "store" data anywhere. It is a transport which you associate with a protocol. The protocol you associate with it can do anything you want with the data delivered to it.

You can find two examples of using StandardIO in the Twisted documentation, https://twistedmatrix.com/documents/current/_downloads/stdin.py and https://twistedmatrix.com/documents/current/_downloads/stdiodemo.py.

like image 75
Jean-Paul Calderone Avatar answered Nov 08 '22 13:11

Jean-Paul Calderone