def __init__(self, comport=None, baudrate=115200, status=None, username='******', password='******'): self.status = status if comport != None: EnhancedSerial.__init__( self, comport, baudrate ) self.login( username, password) else: print "COM port required"
def __init__(self, **kwargs): port = kwargs.get('port', 4) baud = kwargs.get('baud', 115200) timeout = kwargs.get('timeout',.1) EnhancedSerial.__init__( self, port=port, baudrate=baud, timeout=timeout ) id = self.write_wait( '*IDN?') if id.count('SG6000L'): print id else: print 'SG6000L NOT FOUND'
def __init__(self, comport=None, baudrate=115200, status=None, username='******', password='******'): self.status = status if comport != None: EnhancedSerial.__init__(self, comport, baudrate) self.login(username, password) else: print "COM port required"
def __init__(self, **kwargs): port = kwargs.get('port', 4) baud = kwargs.get('baud', 115200) timeout = kwargs.get('timeout', .1) EnhancedSerial.__init__(self, port=port, baudrate=baud, timeout=timeout) id = self.write_wait('*IDN?') if id.count('SG6000L'): print id else: print 'SG6000L NOT FOUND'