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
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