def close(self):
        """ Stops the read thread, waits for it to exit cleanly, then closes the underlying serial port """        
        self.alive = False
        self.rxThread.join()
        self.serial.close()
def close ( self ) : self . alive = False self . rxThread . join ( ) self . serial . close ( )
Stops the read thread, waits for it to exit cleanly, then closes the underlying serial port