By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,846 Members | 1,857 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,846 IT Pros & Developers. It's quick & easy.

automatic progress indicator

P: n/a
Hello,
I have several functions calling each other several times:

iter=0
iterations=50*20 in this case, how can the program calculate this value
automatically ????
def a(y):
for x in range(20):
# this takes a constant time
...
iter+=1
progress=iter/iterations
def b()
for y in range(50):
a(y)
The level of the loops is not known in advance, since the
user can supply his own script to modify the main program.
(b is a library routine, the user will write something like
for value in [...]
for voltage in [...]
b()

I would like to supply a progress indicator, any ideas?
many thanks
Daniel

Oct 2 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.