python: Convert input to upper case on screen as it is typed
问题 How can my Python program convert the user's keyboard input to upper case, as though the user has CAPS LOCK enabled? I want to emulate a program running on a computer which doesn't have any lower-case letters (i.e. a character set more limited than ASCII). The text input, typed interactively by the user at the keyboard, should be forced to upper case in real time as though that's what the user typed. The command line interface could use Python's standard cmd library, or something else. The