Created
January 26, 2025 19:57
-
-
Save mrakitin/4bb4702358cfdcc7ebf61a5fe51d5592 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
import click | |
from tqdm import trange | |
@click.command() | |
@click.option("-c", "--count", default=60, help="Duration in seconds to wait") | |
def timer(count): | |
"""Wait for the specified number of seconds and print the progress bar.""" | |
for _ in trange(int(count)): | |
sleep(1.0) | |
if __name__ == "__main__": | |
timer() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment