Last active
June 7, 2024 01:20
-
-
Save bradmontgomery/59d2a10590ec8f4c527a269851c27d00 to your computer and use it in GitHub Desktop.
raffle.py - a python powered raffle chooser thing
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
A raffle random-person chooser thing. To make this work, | |
pip install progress | |
Then edit the `PEOPLE` list, then run it: | |
python raffle.py | |
or | |
./raffle.py | |
""" | |
import random | |
from progress.bar import Bar | |
PEOPLE = [ | |
'Person 1', | |
'Person 2' | |
] | |
print("\n\n") | |
bar = Bar('And the winner is...', max=10) | |
for i in range(10): | |
[x for x in range(999999)] # short pause... | |
bar.next() | |
bar.finish() | |
print("\n\n\t{}!\n\n".format(random.choice(PEOPLE))) | |
print("-" * 60 + "\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment