playing well with others (newbie question)

Alexander Williams thantos at chancel.org
Wed Dec 22 23:47:09 EST 1999


On 23 Dec 1999 02:02:29 GMT, Michael Esveldt <dante at oz.net> wrote:
>others." Is there some similar command in python? Something to replace
>that pass with that allows me to do other things with my system?

Well, normally one actually does some useful computation in a while 1:
loop, which breaks up the computation into interruptible operations.
If you /absolutely/ want a break in there, you need the time module
and the sleep function therein:

    >>> import time
    >>> while 1:
    >>>     time.sleep(1)
    >>>     pass

The above gets you a 1sec break every time through the loop.  Adjust
to taste.

-- 
Alexander Williams (thantos at gw.total-web.net)           | In the End,
  "Join the secret struggle for the soul of the world." | Oblivion
  Nobilis, a new Kind of RPG                            | Always
  http://www.chancel.org                                | Wins



More information about the Python-list mailing list