network protocols

Verde Denim tdldev at gmail.com
Wed Jun 13 10:50:41 EDT 2012


On 6/13/12, John Sutterfield <jsutter55 at hotmail.com> wrote:
>
> 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
>
JS
Very nice link! Great information here.

-- Jack

>> 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
>



More information about the Python-list mailing list