ekmmeters.py
def initPort(self):
        """ Required initialization call, wraps pyserial constructor. """
        try:
            self.m_ser = serial.Serial(port=self.m_ttyport,
                                       baudrate=self.m_baudrate,
                                       timeout=0,
                                       parity=serial.PARITY_EVEN,
                                       stopbits=serial.STOPBITS_ONE,
                                       bytesize=serial.SEVENBITS,
                                       rtscts=False)
            ekm_log("Pyserial version = " + serial.VERSION)
            ekm_log("Port = " + self.m_ttyport)
            ekm_log("Rate = " + str(self.m_baudrate))
            time.sleep(self.m_init_wait)
            return True
        except:
            ekm_log(traceback.format_exc(sys.exc_info()))

        return False
def initPort(self):
        try:
            self.m_ser = serial.Serial(port=self.m_ttyport,
                                       baudrate=self.m_baudrate,
                                       timeout=0,
                                       parity=serial.PARITY_EVEN,
                                       stopbits=serial.STOPBITS_ONE,
                                       bytesize=serial.SEVENBITS,
                                       rtscts=False)
            ekm_log("Pyserial version = " + serial.VERSION)
            ekm_log("Port = " + self.m_ttyport)
            ekm_log("Rate = " + str(self.m_baudrate))
            time.sleep(self.m_init_wait)
            return True
        except:
            ekm_log(traceback.format_exc(sys.exc_info()))

        return False
def initPort ( self ) : try : self . m_ser = serial . Serial ( port = self . m_ttyport , baudrate = self . m_baudrate , timeout = 0 , parity = serial . PARITY_EVEN , stopbits = serial . STOPBITS_ONE , bytesize = serial . SEVENBITS , rtscts = False ) ekm_log ( "Pyserial version = " + serial . VERSION ) ekm_log ( "Port = " + self . m_ttyport ) ekm_log ( "Rate = " + str ( self . m_baudrate ) ) time . sleep ( self . m_init_wait ) return True except : ekm_log ( traceback . format_exc ( sys . exc_info ( ) ) ) return False
Required initialization call, wraps pyserial constructor.
Required initialization call wraps pyserial constructor .