On Fri, Apr 4, 2014, at 2:01, Andrew Barnert wrote:
1. The console class is basically a wrapper around readline or its equivalent, in which case we have no need for get_key_press or any of the other stuff you asked about.
2. The console class is just the low-level stuff that's implementable on all platforms, like reading and writing keys to the tty/console, and the higher-level function emulates readline and its platform equivalents on top of nothing but that low-level stuff.
I suspect you mean #2. In which case, again, look at how much code readline is. You're talking about duplicating all of that code, just to solve part of the problem (readline is still depending on your terminal to do a lot of the work, which you don't get in raw mode), on just one platform.
A) You don't need any of it on windows, because the windows console's built-in editing functionality is good enough. Even this "default value" stuff wouldn't be hard - you just simulate a bunch of keypresses corresponding to the desired string. B) Any reasonable interface to the windows console won't use byte strings at all.