MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / serial_bytes_available

Method serial_bytes_available

lib/pydos_ui.py:31–44  ·  view source on GitHub ↗
(self,timeout=1)

Source from the content-addressed store, hash-verified

29 self.scrollable = True
30
31 def serial_bytes_available(self,timeout=1):
32 # Does the same function as supervisor.runtime.serial_bytes_available
33 spoll = select.poll()
34 spoll.register(stdin,select.POLLIN)
35
36 retval = spoll.poll(timeout)
37 spoll.unregister(stdin)
38
39 if not retval:
40 retval = 0
41 else:
42 retval = 1
43
44 return retval
45
46 def read_keyboard(self,num):
47 # Does the same function as sys.stdin.read(num), blocking read

Callers 9

get_screensizeMethod · 0.95
rgbrainbowFunction · 0.45
blinkFunction · 0.45
bounce.pyFile · 0.45
anyKeyFunction · 0.45
lcdScrollFunction · 0.45
displayTempFunction · 0.45
pianoFunction · 0.45
rgbblinkFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected