def putc(data, timeout=10): try: size = scheduler.iotimeout(sys.stdout.write, (data,), timeout=timeout) except scheduler.TimeoutError: return None else: return size
def getc(size, timeout=10): try: data = scheduler.iotimeout(sys.stdin.read, (size,), timeout=timeout) except scheduler.TimeoutError: return None else: return data
def putc(self, data, timeout=10): try: size = scheduler.iotimeout(self.stream.write, (data,), timeout=timeout) except scheduler.TimeoutError: return None else: return size
def putc(data, timeout=10): try: size = scheduler.iotimeout(sys.stdout.write, (data, ), timeout=timeout) except scheduler.TimeoutError: return None else: return size
def getc(size, timeout=10): try: data = scheduler.iotimeout(sys.stdin.read, (size, ), timeout=timeout) except scheduler.TimeoutError: return None else: return data
def putc(self, data, timeout=10): try: size = scheduler.iotimeout(self.stream.write, (data, ), timeout=timeout) except scheduler.TimeoutError: return None else: return size