Last active
August 29, 2015 14:14
-
-
Save Echocage/15a6eef6d85b40ea4336 to your computer and use it in GitHub Desktop.
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
import time | |
def get_contents(file_name): | |
return open(file_name).readlines() # Return a list of the lines of text | |
last_version = get_contents('test.txt') | |
while True: | |
current_version = get_contents('test.txt') | |
if last_version != current_version: # Has it changed from what it was before? | |
print('Changes Made') | |
last_version = current_version | |
time.sleep(.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment