On 07/02/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > How to send an array via socket to the other end?Thanks.
What you want is a serialisation solution - turning objects into a string format, and vice versa. Python provides a system for this in its standard library, in the pickle module. Some pseudocode might look like: #sender import pickle socket_send(pickle.dumps(my_list)) #receiver import pickle my_list = pickle.loads(read_all_socket_data()) However, this should only be used if you trust where the data is coming from; with untrusted data, a more restrictive format (such as JSON, perhaps, or a similar lightweight notation system if you are only sending lists) would be a good idea. --Sam -- http://mail.python.org/mailman/listinfo/python-list