(self, num=1)
return b''.join(s)
Non-blocking read of up to `num` chars from stdin.
Non-blocking read of up to `num` chars from stdin.
Non - blocking read of up to num chars from stdin .
def read(self, num=1):
        """Non-blocking read of up to `num` chars from stdin."""
        s = []
        # note that kbhit assumes keyboard
        # so won't work with redirects on Windows
        while console.key_pressed() and len(s) < num:
            c = stdio.stdin.buffer.read(1)
            if self._crlf and c == b'\n':
                c = b'\r'
            if c:
                s.append(c)
        return b''.join(s)
def read ( self , num = 1 ) : s = [ ] # note that kbhit assumes keyboard # so won't work with redirects on Windows while console . key_pressed ( ) and len ( s ) < num : c = stdio . stdin . buffer . read ( 1 ) if self . _crlf and c == b'\n' : c = b'\r' if c : s . append ( c ) return b'' . join ( s )