automatic progress indicator

R

rubbishemail

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top