Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a simple way to exit a while loop on keystroke?


  • From: half.italian at gmail.com (half.italian at gmail.com)
  • Subject: Is there a simple way to exit a while loop on keystroke?
  • Date: Fri, 31 Aug 2007 21:02:01 -0000

On Aug 31, 11:11 am, gsxg <rha... at gmail.com> wrote:
> Thanks,
> The curses library doesn't look to helpful to me.  However using CTRL-
> C is fine and is working nicely.
>
> BTW, it should be "time.sleep(1)" in the example above, instead of
> just
> "sleep(1)"  (Just in case any other newbies like me read this)
>
> Thanks again

Depends on how you import 'time'

import time
time.sleep(1)

from time import sleep
sleep(1)

~Sean