Last active
January 6, 2017 23:08
-
-
Save Nalisarc/c90930b9323830083541726de1652914 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
#!/usr/bin/env python3 | |
import sys | |
import time | |
import random | |
import simpleaudio as sa | |
parser = argparse.ArgumentParser(description="Converts html tables into csv tables") | |
parser.add_argument("-v","--verbose", help="Enables verbose mode, useful for debugging.", action="store_true") | |
args = parser.parse_args() | |
verboseprint = print if args.verbose else lambda *a, **k: None | |
wave_obj = sa.WaveObject.from_wave_file("C:\Windows\Media\Alarm09.wav") | |
choices = ("change player", "change game") | |
def main(): | |
while True: | |
t = random.randint(1,10) | |
verboseprint("Sleeping for: {0} seconds".format(t)) | |
time.sleep(t) | |
print(random.choice(choices)) | |
play_obj = wave_obj.play() | |
play_obj.wait_done() | |
return None | |
if __name__ == '__main__': | |
main() | |
sys.exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment