I have started using telnet lib in Python recently, what is the difference between tn.read_all and tn.read_very_eager in Python.
I have started using telnet lib in Python recently, what is the difference between tn.read_all and tn.read_very_eager in Python.
From the documentation for read_all:
Read all data until EOF as bytes; block until connection closed.
From the documentation for read_very_eager:
Read everything that can be without blocking in I/O
So read_all reads all from the connection, until it's closed. It will block if there's no data to read, but the connection it still open.
The read_very_eager will read until either connection-closed or there's no more data to currently read (where read_all would block).
For more information please read the documentation and other online references and tutorials.