IPv6转化成全写与简写,字母大写或小写:
from IPy import IP
# IPv6转成全写并字母大写
ipStr = IP("2403:A200:A200:1100:0000:0000:F00:3",make_net=True).strFullsize().upper()
# IPv6 转化成简写并字母小写
IP("2403:A200:A200:1100:0000:0000:F00:3",make_net=True).net().lower()
2023-12-10 23:50:03