`import socket
def Main():
host = "127.0.0.1"
port = 2000
s = socket.socket()
s.connect((host, port))
message = input("-> ")
while message != "q":
s.send(message)
data = s.recv(1024)
print("Received from server: " + str(data))
message = input("-> ")
s.close()
if __name__ == '__main__':
Main() #a problem with this code`
錯誤(http://pastebin.com/AvaGSJzB) 請幫我 我不知道該怎麼辦類型錯誤:「STR」不支持緩衝界面,它是不是在這裏給出的所有
請將您的錯誤與您如何調用此代碼一起放在這裏。 – Marcin 2014-09-06 20:45:42