array/list of sockets

Johannes Findeisen mailman at hanez.org
Sat Oct 26 17:59:26 EDT 2013


Hi,

On Sat, 26 Oct 2013 14:41:15 -0700 (PDT)
theelder777@ wrote:

> Hello all, I am kind of new to python. I am currently trying to make and use a list/array of sockets in a program. So I have declared an array as follows:
> myCSocks = ['CSock1', 'CSock2', 'CSock3', 'CSock4', 'CSock5']

You actually have added strings to your list. this 'is_a_string.

You need to add the objcts to the list. E.g.: 

myCSocks = [CSock1, CSock2, CSock3, CSock4, CSock5]

Hope this helps.

Regards,
Johannes



More information about the Python-list mailing list