Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Added tqdm progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Nov 22, 2022
1 parent 35d1cf0 commit 9f429d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/swiftest/swiftest/simulation_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import subprocess
import shlex
import warnings
from tqdm import tqdm
from typing import (
Literal,
Dict,
Expand Down Expand Up @@ -376,7 +377,8 @@ def _run_swiftest_driver(self):
env=env,
universal_newlines=True) as p:
process_output = False
for line in p.stdout:
noutput = int((self.param['TSTOP'] - self.param['T0']) / (self.param['DT'] * self.param['ISTEP_OUT']))
for line in tqdm(p.stdout,total=noutput):
if "SWIFTEST STOP" in line:
process_output = False

Expand Down

0 comments on commit 9f429d1

Please sign in to comment.