Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to let a loop run for a while before checking for break condition?

Reply
Thread Tools

How to let a loop run for a while before checking for break condition?

 
 
Sorin Schwimmer
Guest
Posts: n/a
 
      08-28-2006
to Fredrik Lundh
I'm afraid Claudio Grondi can't use your solution, as
he needs it hosted on Windows, which lacks
signal.alarm.

to Claudio Grondi
How about splitting your loop in two? The first loop
would check for your boolean, which is changed by your
timer, the second loop will check for your "normal"
exit condition?

Sorin

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 
Reply With Quote
 
 
 
 
Claudio Grondi
Guest
Posts: n/a
 
      08-28-2006
Sorin Schwimmer wrote:
> to Fredrik Lundh
> I'm afraid Claudio Grondi can't use your solution, as
> he needs it hosted on Windows, which lacks
> signal.alarm.
>
> to Claudio Grondi
> How about splitting your loop in two? The first loop
> would check for your boolean, which is changed by your
> timer, the second loop will check for your "normal"
> exit condition?

I don't understand your proposal. Do you mean using another thread?
I suppose, that wxPython provides something like what I am looking for,
but using it only to speed up a Python loop is sure not an option.
Concluding from lack of responses related to a Windows version of
Fredriks solution I suppose, that there is no way to achieve it with
standard Python on Windows.

Claudio Grondi
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Triple nested loop python (While loop insde of for loop inside ofwhile loop) Isaac Won Python 9 03-04-2013 10:08 AM
How to let a loop run for a while before checking for break condition? Claudio Grondi Python 16 08-30-2006 05:40 AM
How to let a loop run for a while before checking for break condition? Sorin Schwimmer Python 2 08-29-2006 04:20 AM
while loop in a while loop Steven Java 5 03-30-2005 09:19 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57