Skip to content

Commit

Permalink
put spinners on fixed intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
brifordwylie committed Feb 2, 2024
1 parent 588fc42 commit cda7715
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/sageworks/utils/repl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ def spin(self):
spinners = [itertools.cycle(frames) for _ in range(4)] # Create four separate cycle iterators

# Initialize each spinner to a random position in the cycle
for spinner in spinners:
steps = random.randint(0, len(frames) - 1)
for _ in range(steps):
for i, spinner in enumerate(spinners):
for _ in range(i*2):
next(spinner)

self._hide_cursor()
Expand Down

0 comments on commit cda7715

Please sign in to comment.