Skip to content

Instantly share code, notes, and snippets.

@sc68cal
Created March 25, 2015 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sc68cal/f3f946a5e0f6ccca9660 to your computer and use it in GitHub Desktop.
Save sc68cal/f3f946a5e0f6ccca9660 to your computer and use it in GitHub Desktop.
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import netaddr
>>> netaddr.valid_ipv4("192.168")
True
>>> netaddr.valid_ipv4("192.168.")
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment