How to get the result of the instruction using the port 29999

I have a problem, when i use the port 29999 with a python script and sockets librairies. I can send instruction like load program and play but for instruction like get operational mode, i receive just a number.

x = client_socket.send((“get operational mode \n”).encode())
print(x)

output:

21 or i want to receive a string like data or a data more comprehensible