[Pymilter] pymilter current state
Stuart D Gathman
stuart at bmsi.com
Mon Jul 14 18:03:24 EDT 2014
On 07/14/2014 05:56 PM, Christian Rößner wrote:
> I am asking for Python3, because I realize that all kinds of modules
> are still not ported to 3.x and I wonder why, because many new modules
> are included in std lib in newer Python. For example IP address
> support will be part of 3.4 (I believe).
In Python 2.x, the ipaddr module (notice different spelling than
ipaddress for python3) provides the same support. For code (like pyspf)
that runs in both 2 and 3, you can do this:
try:
# Python standard library as of python3.3
import ipaddress
except ImportError:
try:
import ipaddr as ipaddress
except ImportError:
print('ipaddr module required:
http://code.google.com/p/ipaddr-py/')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gathman.org/pipermail/pymilter/attachments/20140714/9131951a/attachment.html>
More information about the Pymilter
mailing list