host = "127.0.0.1"
port=4446
from socket import *
s = socket(AF_INET, SOCK_STREAM)
s.bind((host,port))
s.listen(1)
print("Listening for connections...")
q,addr = s.accept()
data = input("Type something in")
q.send(data)
s.close
錯誤
TypeError:'str' does not support the buffer interface
所以我知道有數百個問題就在這裏這個錯誤,但我仍然無法想出一個解決方案,你們中的一個人可以幫我嗎? :(
@Wooble:這是一個爲http://sopython.com常見問題列表。 –
@Wooble我找不到我的答案使用任何其他問題,所以我做了我自己的。 – user3241744