Under what kind of situation, time.sleep(n) would sleep much longer than n seconds?
Marko Rauhamaa
marko at pacujo.net
Thu Jun 19 05:20:56 EDT 2014
Chris Angelico <rosuav at gmail.com>:
> Yeah, I think [raw_]input() isn't so bad after all.
I have never used it.
I *have* used getpass.getpass(). Unfortunately, it doesn't have a
corresponding prompt and raw input variant so I've had to essentially
copy over getpass() code and modify that:
fd = os.open('/dev/tty', os.O_RDWR | os.O_NOCTTY)
input = output = os.fdopen(fd, 'w+', 1)
etc.
Thing is, the standard streams are used for real work instead of
interacting with the user.
Marko
More information about the Python-list
mailing list