Keyboard input using stdio.StandardIO in twisted python

I have doubts about twisted python related to my multi-hearted chat server program.

those. when we enter keyboard input using stdio.StandardIO , where is it stored when the reactor starts? Can someone give me an answer please.

+6
source share
1 answer

twisted.internet.stdio.StandardIO does not store data anywhere. This is the transport that you associate with the protocol. The protocol that you associate with it can do everything you need with the data passed 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 .

+6
source

Source: https://habr.com/ru/post/902583/


All Articles