diff --git a/src/util.py b/src/util.py new file mode 100644 --- /dev/null +++ b/src/util.py @@ -0,0 +1,13 @@ +def progress(i, n, i0=0): + def _progress(i,n,i0): + return 100*(i+1-i0)//(n-i0) + + if n_progress(i-1,n,i0): + print(r"{0}%".format(percentage),end="") + if percentage==100: print()