Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def check_output(file, interval_time, logfile_path):
- import os
- import time
- status = os.path.isfile(file)
- while status is not True:
- f_log = open(logfile_path, 'a')
- f_log.write(time.asctime() + '\t' + 'Still running\n')
- f_log.close()
- time.sleep(interval_time)
- status = os.path.isfile(file)
- # What should be done after the file appears?
- # This goes here:
- f_log = open(logfile_path, 'a')
- f_log.write(time.asctime() + '\t' + 'FINISHED\n')
- f_log.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement