Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Date: Thu, 19 Jun 2014 12:20:56 +0300 Organization: A noiseless patient Spider Lines: 20 Message-ID: <87lhstntl3.fsf@elektro.pacujo.net> References: <713f4189-5ffe-492d-9c7d-447bb4b4928a@googlegroups.com> <4d7c474a-b88e-4dea-b74c-ed34f4969310@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx05.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="5795"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184czJ6Sgyy0zjZ6QSo6uO3" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:C1fyualr7VUVpgRver7yQXJvCtE= sha1:na+RQXBblZHBBWuGCbhdzqSm+bo= Xref: csiph.com comp.lang.python:73407 Chris Angelico : > 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