Compare commits
2 commits
cf5c96c28e
...
c9bddb08d7
Author | SHA1 | Date | |
---|---|---|---|
c9bddb08d7 | |||
869801d537 |
2 changed files with 17 additions and 2 deletions
|
@ -131,13 +131,13 @@ def print_level(level:int, module:str):
|
|||
"""
|
||||
from datetime import datetime
|
||||
|
||||
max_len_module = 10
|
||||
max_len_module = 14
|
||||
|
||||
date = datetime.now()
|
||||
out=""
|
||||
out+=date.strftime("%H:%M:%S")
|
||||
out+=" | "
|
||||
out+=module.upper().ljust(max_len_module)
|
||||
out+=module.upper().center(max_len_module)
|
||||
out+=" | "
|
||||
out+=">"*level
|
||||
out+=" "
|
||||
|
|
15
progress_bar.py
Normal file
15
progress_bar.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
if __name__ == "__main__":
|
||||
from argparse import ArgumentParser
|
||||
from tqdm import tqdm
|
||||
from low_level import progress_bar_from_logfile
|
||||
|
||||
parser = ArgumentParser(description="Progress bar from log files.")
|
||||
parser.add_argument("-l","--logdir", type=str, help="Log directory.")
|
||||
parser.add_argument("-s","--simname", type=str, help="Simulation name.")
|
||||
parser.add_argument("-n","--N_tiles", type=int, help="Number of tiles.")
|
||||
parser.add_argument("-v","--verbose", type=int, default=1, help="Verbose level.")
|
||||
|
||||
parsed_args = parser.parse_args()
|
||||
|
||||
for b in tqdm(range(1,parsed_args.N_tiles**3+1), desc="sCOLA", unit="box", disable=(parsed_args.verbose==0)):
|
||||
progress_bar_from_logfile(parsed_args.logdir+parsed_args.simname+".log_"+str(b), desc=f"Box {b}/{parsed_args.N_tiles**3}", verbose=parsed_args.verbose, leave=False)
|
Loading…
Add table
Reference in a new issue