Changeset 439 in tmcsimulator for trunk/webapps/unifiedlogger/cad_watcher.py
- Timestamp:
- 07/11/2019 02:45:25 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/webapps/unifiedlogger/cad_watcher.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/unifiedlogger/cad_watcher.py
r436 r439 3 3 4 4 # CAD comment log Watcher 5 # Look for changes in the CAD comment log 5 # Look for changes in the CAD comment log. 6 # The CADserver will append new comments to the log as they arrive 7 # from clients. We only need to keep track of the log length in order to 8 # determine if a new comment has been added. We will output the 9 # new messages that arrived during the last wait interval. 6 10 # jdalbey 7/6/2019 7 11 … … 14 18 return not isEmpty(cmsitem) 15 19 16 # Read the c ms message file20 # Read the cad comments log 17 21 def readFile(): 18 22 lines = [] 19 23 try: 20 text_file = open(" ../../CADcomments.log", "r")24 text_file = open("CADcomments.log", "r") 21 25 except IOError: 22 26 print "Error: missing CADcomments.log file." … … 39 43 return currList 40 44 45 # Local main for unit testing 41 46 def main(): 42 47 setup() 43 # Loop Forever 48 # Loop Forever, checking every five seconds 44 49 while True: 45 # Look for changedmessages50 # Look for new messages 46 51 answer = getLogEntries() 47 52 # Output results
Note: See TracChangeset
for help on using the changeset viewer.
