1

我需要知道如何在这种情况下将数据传递给 valueList 一次,然后等待几秒钟,然后再次将数据传递给 valueList。我不希望数据被连续传递,而是我希望它被传递一次,然后几秒钟,然后再传递几秒钟。

screenw = 0
screenh = 0
while 1:
    client_socket.send("loc\n")
    data = client_socket.recv(8192)
    valueList = data.split()

    if (not(valueList[-1] == "eom" and valueList[0] == "start")):
        #print "continuing.."
            continue

        if(screenw != int(valueList[2])):
            screenw = int(valueList[2])
            screenh = int(valueList[3])
4

0 回答 0