It depends on what data format the values are sent over the socket. If they are sent as text, then you can use standard text to float conversion. If the values are sent as binary data, then you can use the
struct module to extract the values. The following post has an example of this,
http://www.worldviz.com/forum/showthread.php?t=1347