Chris Angelico <ros...@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
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to