def __init__(self, instruments, host, port, verbose=False): self.experiments = {} self.instruments = instruments self.host = host self.port = port self.verbose = verbose set_logging_config() super(Server, self).__init__()
def get_socket(HOST='localhost', PORT=50007): set_logging_config() s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) return s