socket.inet_ntop, and pton question

Gabriel Genellina gagsl-py at yahoo.com.ar
Sun Jan 28 21:08:00 EST 2007


At Sunday 28/1/2007 15:17, Irmen de Jong wrote:

> > Are these functions (inet_ntop(), inet_pton()) from the socket library
> > supported on Windows.
>
>Why didn't you just try:
>
>[E:\Projects]python
>Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit 
>(Intel)] on win32
>Type "help", "copyright", "credits" or "license" for more information.
>  >>> import socket
>  >>> socket.inet_aton("127.0.0.1")
>'\x7f\x00\x00\x01'
>  >>> socket.inet_ntoa(_)
>'127.0.0.1'
>  >>>

But these are not the requested functions, inet_ntop() and inet_pton():

py> socket.inet_ntop
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'inet_ntop'


-- 
Gabriel Genellina
Softlab SRL 


	

	
		
__________________________________________________ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 




More information about the Python-list mailing list