区分IPv4与IPv6:

>>> import IPy
>>> ip_address = '172.19.10.178'
>>> print IPy.IP(ip_address).version()
4
>>> import IPy
>>> ip_address = '::1'
>>> print IPy.IP(ip_address).version()
6

  

相关文章:

  • 2021-07-21
  • 2022-01-13
  • 2021-11-26
  • 2021-06-10
  • 2021-11-02
猜你喜欢
  • 2021-11-02
  • 2022-12-23
  • 2022-01-01
  • 2021-07-10
  • 2021-09-01
  • 2021-11-02
  • 2021-11-02
相关资源
相似解决方案