![]() |
|
#8
|
|||
|
|||
|
When sending data using the socket module, the data needs to be a string containing the raw byte data. Have a look at the Python struct module for packing Python integer/float values into raw byte data. The following example shows how to generate raw byte data from 2 integer values:
Code:
import struct
data = struct.pack('ii',value1,value2)
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| real time collision on animation path | whj | Vizard | 10 | 10-06-2008 05:38 PM |
| Real Time Audio Data | lomendil | Vizard | 2 | 06-02-2008 09:18 PM |
| Can I get real time Intersense tracking data from another computer on the network? | GoldenSun | Vizard | 4 | 04-30-2008 08:42 PM |
| Flagging the Data | Elittdogg | Vizard | 5 | 04-11-2008 12:40 PM |
| timer question | Elittdogg | Vizard | 5 | 10-10-2007 03:49 PM |