我的python版本是2.7,我遇到如下图所示的问题
这是客户
name = raw_input("Please enter your username: ")
passwd = raw_input("Please enter you password: ")
data = {"username": name, "password": passwd}
sock.connect((HOST,PORT))
sock.sendall(bytes(json.dumps(data))
这是服务器
rcv_msg = json.loads(self.client_socket.recv(1024).strip())
print rcv_msg
username = rcv_msg['username']
password = rcv_msg['password']
print "username: " + username
print "password: " + password
但是,我仍然得到用户名和密码...... 请有人帮我清理这个bug〜谢谢