automatic progress indicator

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rubbishemail@web.de

    #1

    automatic progress indicator

    Hello,


    I have several functions calling each other several times:

    iter=0
    iterations=50*2 0 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

Working...