I am trying to use python's “new” is_global method to determine if the IP address is allocated to public networks ( https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address.is_global ). However, this does not work:
>>> import ipaddress >>> ip = ipaddress.IPv4Address('192.0.2.1') >>> ip.is_private True >>> ip.is_reserved False >>> ip.is_global Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'IPv4Address' object has no attribute 'is_global' >>>
As shown above, other methods like is_private work fine. I am using python 3.5.1.
Any ideas?
ipaddress.py. is_global, , Spring 2014, . - .
ipaddress.py
is_global
:. @galgalesh, is_global . Python 3.5 2016-06-11.
is_global Python 3.5 +.
Source: https://habr.com/ru/post/1622198/More articles:How to display ancient Egyptian hieroglyphs in .NET? - c #Include JavaScript code without packaging as a module - javascriptUnexpectedly growing iOS app size with TestFlight - iosHow to save audio data from blob url to file system and path in mysql db - javascriptDeploying a docker container to store stored volumes - dockerHow to set AppBarLayout height to 0 - androidКак создать директиву для этого примера выбора даты? - javascriptRefactoring methods that use the same code but different methods inside - c #The work of the fragment manager - androidRedirect to "NUL" failed: FileStream will not open Win32 devices - powershellAll Articles