This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# keydown data from the web | |
# http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes | |
map = | |
backspace: 8 | |
tab: 9 | |
enter: 13 | |
shift: 16 | |
ctrl: 17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mass_input(prompt=None, lines=None, end=None): | |
"""Returns a list of lines of input.""" | |
# Must only have lines *or* end. | |
assert lines is None or end is None | |
# *Must* have lines or end. | |
assert lines is not None or end is not None | |
# Output array |