[Tutor] timeout

Rinzwind w.damen at gmail.com
Mon Jan 16 14:33:58 CET 2006


Hello,

With the time module and sleep(60)?
http://www.python.org/doc/2.3.5/lib/module-datetime.html

*sleep*( secs) Suspend execution for the given number of seconds. The
argument may be a floating point number to indicate a more precise sleep
time. The actual suspension time may be less than that requested because any
caught signal will terminate the sleep() following execution of that
signal's catching routine. Also, the suspension time may be longer than
requested by an arbitrary amount because of the scheduling of other activity
in the system.

Wim

On 1/16/06, frank h. <frank.hoffsummer at gmail.com> wrote:
>
> Hello
> how can I break a loop after a certain amount of time has passed?
>
> pseudocode:
>
> with timeout of 60sec:
>     while True:
>         pass
>
> is there a simple way? without resorting to queues etc. (this is a bit
> over my head....)
> thanks for any insight you might have
> -frank
>
>
> On 1/16/06, frank h. <frank.hoffsummer at gmail.com> wrote:
> > Hello
> > how can I break a loop after a certain amount of time has passed?
> >
> > pseudocode:
> >
> > with timeout of 60sec:
> >
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060116/c0720b62/attachment.html 


More information about the Tutor mailing list