network protocols
John Sutterfield
jsutter55 at hotmail.com
Wed Jun 13 10:10:25 EDT 2012
Tarek,
There doesn't appear to be a function in stdlib to cover that particular case.
Doug Hellman has a nice section on finding service info here:
http://www.doughellmann.com/PyMOTW/socket/addressing.html
It wouldn't be "built-in", but it looks like it would be pretty simple to get the info you need.
Best regards,
JS
> Date: Wed, 13 Jun 2012 13:41:25 +0200
> From: tarek at ziade.org
> To: python-list at python.org
> Subject: network protocols
>
> Hey
>
> I was surprised not to find any way to list all protocol names listed in
> /etc/protocols in Python
>
> We have
>
> socket.getprotobyname(NAME)
>
> But there's no way to get the list of names
>
> Any ideas if this is available in the stdlib somehwere ?
>
> Thx
> Tarek
> --
> http://mail.python.org/mailman/listinfo/python-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120613/9045e4d0/attachment.html>
More information about the Python-list
mailing list