New submission from Leon Weber:
I was missing a method to compute the reverse DNS name for an IP address, and I
felt this is something that would belong in the ipaddress module; so here’s a
patch for the ipaddress module adding a reverse_name property to IPv?Address.
This is an example:
>>> ipaddress.ip_address("127.0.0.1").reverse_name
'1.0.0.127.in-addr.arpa.'
>>> ipaddress.ip_address("2001:db8::1").reverse_name
'1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.'
Would this be an acceptable feature for inclusion in the ipaddress module?
----------
components: Library (Lib)
files: ipaddress_reverse_names.patch
keywords: patch
messages: 209933
nosy: leonn, ncoghlan, pmoody
priority: normal
severity: normal
status: open
title: Add ipaddress property to get reverse DNS name
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file33851/ipaddress_reverse_names.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20480>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com