pair = value.split(":") hostname = pair[0] port = int(pair[1]) if key == "-h": printHelp() exit(1) if key == "-r": speed = int(value) socket = create_connection((hostname, port)) line = Line(socket) #line = DebugLine(line) piv = Piv(line) kshd = Kshd(piv, address) kshd.stop() if True: kshd.setCoordinate(0) conf = kshd.getConfiguration() conf.moveCurrent = 1 conf.holdDelay = 0.5 kshd.setConfiguration(conf) print(kshd.getConfiguration()) print(kshd.getSpeed()) def wait(): while True: s = kshd.status() # print(s) #print("To go:",kshd.getStepsToGo()) if s.ready: