qmi.core.read_keyboard

Implementation of class KeyboardReader.

The KeyboardReader provides a way to read lines from the keyboard without blocking in a platform-independent way.

Classes

KeyboardReader()

A class that implements non-blocking read of single lines from the keyboard.

class qmi.core.read_keyboard.KeyboardReader

A class that implements non-blocking read of single lines from the keyboard.

poll_line() str

Read a line from the keyboard without blocking.

If keyboard input is waiting, return a string containing one line of input. Otherwise, return an empty string.

clear_buffer() None

Remove pending data from the keyboard input buffer.

poll_quit() bool

Check if the user has typed “Q” to stop the measurement.

Return True if the user has typed “Q”, otherwise return False.