So I wanted some sort of progress printed while my import into tryton runs .. I just had dots to start with .. not easy to keep track though.
Came up with this fun little function to make it easier to see approximately how far (in a ASCII-graphical way:
def print_progress(ncount): scount = ' ' if ncount % 1000 == 0: scount = 'M' elif ncount % 500 == 0: scount = 'D' elif ncount % 100 == 0: scount = 'C' elif ncount % 50 == 0: scount = 'L' elif ncount % 10 == 0: scount = 'X' else: scount = '.' print(scount, end='', flush = True)
use dots in general, but dump in some roman literals to make it easier
Share on Twitter Share on Facebook
Comments
There are currently no comments
New Comment