a question about socket objects

Dag Hansteen d-hanst at online.no
Wed Dec 22 15:38:05 EST 2004


Hello,

I have a question:
How do I append a socket object into a list "manually" without appending the variable which the socket object is stored in, but just the socket object itself if I somehow know the address(pretend like)? 
I dont "need" this in any way for my code, but I would like to know, for a better understanding of network programming

I know how to do it like 
"socketobject, addr = sock.accept()".
Then append socketobject to that list

But if we just pretend like I know that the socketobject is <socket._socketobject object at 0x00D5A4E0>, how can I append this socket._socketobject to the list? 
like list.append(<socket._socketobject object at 0x00D5A4E0>) ??? 

Thats what I want to know, not that I need it, but I'm curious to know how python handles/work with the socket objects in general

Any answer or explanation is greatly appreciated!

Best regards
Dag Hansteen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20041222/6de4d53b/attachment.html>


More information about the Python-list mailing list