def __init__(self, device, baudrate, store, rounds=100, timeout=60):
        """
        Initialize the serial reader class
            device        device name to connect to
            baudrate      the baud rate for the serial line
            store        the data store object to send the data to
            rounds        number of rounds to run / listen for input
        """
        threading.Thread.__init__(self)
        self.baudrate = baudrate
        self.store = store
        self.rounds = rounds
        self.do_run = True
        self.device_name = device
        try:
            if device:
                self.device = serial.Serial(device, self.baudrate, timeout=timeout);
        except serial.serialutil.SerialException:
            print("Could not connect to the serial line at " + self.device_name)
def __init__ ( self , device , baudrate , store , rounds = 100 , timeout = 60 ) : threading . Thread . __init__ ( self ) self . baudrate = baudrate self . store = store self . rounds = rounds self . do_run = True self . device_name = device try : if device : self . device = serial . Serial ( device , self . baudrate , timeout = timeout ) ; except serial . serialutil . SerialException : print ( "Could not connect to the serial line at " + self . device_name )
Initialize the serial reader class
            device        device name to connect to
            baudrate      the baud rate for the serial line
            store        the data store object to send the data to
            rounds        number of rounds to run / listen for input