[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to design a class that will listen on stdin?

zljubisic at gmail.com wrote at 2020-5-23 04:24 -0700:
>I have to talk to outer system by stdin/stdout.
>Each line that comes to stdin should be processed and its result returned back to stdout. Logging should go to stderr.
>How to design a class that will listed to stdin and call required methods in order to process the data?

Start by reading the Python tutorial
especially section 7.