Commit a590ba1a authored by multrus's avatar multrus
Browse files

Merge branch 'progress_bar_beautification' into 'main'

use different ASCII characters for progress bar

See merge request !33
parents d936bbd3 1dc8a0ad
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ def create_error_pattern(
        gen_patt(100, "ep.g192", 5, working_dir=tmp_dir_test)
        if not tmp_sta_file_test.exists():
            raise RuntimeError(
                "Used version of gen-patt was detected to be faulty (unable to write \"sta\"-file). See bin/README.md for details."
                'Used version of gen-patt was detected to be faulty (unable to write "sta"-file). See bin/README.md for details.'
            )

    with TemporaryDirectory() as tmp_dir:
+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ def progressbar(iter: Iterable, width=80):
    def update(progress):
        fill = int(width * progress / count)
        print(
            f"{int(progress/count*100):3d}%{'|'}{'X'*fill}{('.'*(width-fill))}{'|'}{progress}/{count}",
            f"{int(progress/count*100):3d}%{'|'}{'='*fill}{(' '*(width-fill))}{'|'}{progress}/{count}",
            end="\r",
            file=sys.stdout,
            flush=True,