Skip to content

Instantly share code, notes, and snippets.

@bradmontgomery
Last active June 7, 2024 01:20
Show Gist options
  • Save bradmontgomery/59d2a10590ec8f4c527a269851c27d00 to your computer and use it in GitHub Desktop.
Save bradmontgomery/59d2a10590ec8f4c527a269851c27d00 to your computer and use it in GitHub Desktop.
raffle.py - a python powered raffle chooser thing
#!/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