 """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import time <EOL> _mtimes = { } <EOL> def timecheck ( files ) : <EOL> """<STR_LIT>""" <EOL> global _mtimes <EOL> for filename in files : <EOL> mtime = os . stat ( filename ) . st_mtime <EOL> if filename not in _mtimes : <EOL> _mtimes [ filename ] = mtime <EOL> elif mtime != _mtimes [ filename ] : <EOL> _mtimes = { } <EOL> return True <EOL> else : <EOL> return False <EOL> def watcher ( command , files ) : <EOL> """<STR_LIT>""" <EOL> while True : <EOL> if timecheck ( files ) : <EOL> os . system ( command ) <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> def main ( ) : <EOL> command , files = sys . argv [ <NUM_LIT:1> ] , sys . argv [ <NUM_LIT:2> : ] 
 try : 
 """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import time <EOL> _mtimes = { } <EOL> def timecheck ( files ) : <EOL> """<STR_LIT>""" <EOL> global _mtimes <EOL> for filename in files : <EOL> mtime = os . stat ( filename ) . st_mtime <EOL> if filename not in _mtimes : <EOL> _mtimes [ filename ] = mtime <EOL> elif mtime != _mtimes [ filename ] : <EOL> _mtimes = { } <EOL> return True <EOL> else : <EOL> return False <EOL> def watcher ( command , files ) : <EOL> """<STR_LIT>""" <EOL> while True : <EOL> if timecheck ( files ) : <EOL> os . system ( command ) <EOL> time . sleep ( <NUM_LIT:1> ) <EOL> def main ( ) : <EOL> command , files = sys . argv [ <NUM_LIT:1> ] , sys . argv [ <NUM_LIT:2> : ] <EOL> try : <EOL> watcher ( command , files ) <EOL> except KeyboardInterrupt : <EOL> pass <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
