Created
March 28, 2019 08:04
-
-
Save geekykant/549be4c34ac719b0a27570af4f28baa3 to your computer and use it in GitHub Desktop.
Play music for every new line added to text file
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
import os | |
old_ll = None | |
new_ll = None | |
with open("values.txt", "r+") as f: | |
for old_ll in f: | |
pass | |
while(1): | |
with open("values.txt", "r+") as f: | |
for new_ll in f: | |
pass | |
if(old_ll!=new_ll): | |
old_ll = new_ll | |
os.system("open aduio.mp3") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment