Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Socket inet_pton() is not included
-
First of all, I'm not good at Pythonista. I moved netaddr module to site-packages-2 after downloading it using pipista. When I import netaddr, I get an Error below. I found the default socket.py module has no inet_pton(). I'm wondering why socket.py has no inet_pton and how to solve this problem. I need your advice.
from socket import inet_pton as _inet_pton, AF_INET
ImportError: cannot import name inet_pton -
FWIW, under Python 3
socket.inet_pton
andsocket.inet_ntop
exist. Under Python 2 they don't for some reason.The
netaddr
library seems to be compatible with Python 2 and 3, so maybe you can get it to work under Python 3. -
Thank you for your kind reply. As your information, it's just time for me to migrate to Python 3.x.