def disconnect(self):
        '''
        Disconnect from the serial port
        '''
        if self._poll_stop_event:
            self._poll_stop_event.set()
        if self._driver:
            if self.status != 'idle':
                self.deactivate()
            self._driver.disconnect()
def disconnect ( self ) : if self . _poll_stop_event : self . _poll_stop_event . set ( ) if self . _driver : if self . status != 'idle' : self . deactivate ( ) self . _driver . disconnect ( )
Disconnect from the serial port