import threading import GlobalVariables import serial import time import datetime class ReadTemperatures(threading.Thread): def run(self): time.sleep(0.01) while(GlobalVariables.UserInput[1:]!="exit" and GlobalVariables.UserInput[1:] != "EXIT"): filename="/ct3data/SlowData/CLIM_20090924.slow" file = open(filename, 'r') #ArduinoMessage = self.ser.readline() Lines= file.readlines() lastline=Lines[-1] #print Lines[-1] file.close() Message = lastline[lastline.find('['):] GlobalVariables.ServerMessage = Message #print Message time.sleep(5)