GithubHelp home page GithubHelp logo

alberanid / python-iplib Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 25 KB

Python module to convert amongst many different notations and to manage CIDR notation.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
python library cidr ip netmask notations conversion network address

python-iplib's Issues

make IPLib compatible with Python 3

Hello,

I tried installing this on Python 3.6.5, Ubuntu 18.04. Here's the output.

# python setup.py install
running install
running build
running build_py
creating build
creating build/lib
copying iplib.py -> build/lib
running build_scripts
creating build/scripts-3.6
copying and adjusting ./bin/cidrinfo -> build/scripts-3.6
copying and adjusting ./bin/ipconv -> build/scripts-3.6
copying and adjusting ./bin/nmconv -> build/scripts-3.6
changing mode of build/scripts-3.6/cidrinfo from 644 to 755
changing mode of build/scripts-3.6/ipconv from 644 to 755
changing mode of build/scripts-3.6/nmconv from 644 to 755
running install_lib
copying build/lib/iplib.py -> /home/user/project/.venv/lib/python3.6/site-packages
byte-compiling /home/user/project/.venv/lib/python3.6/site-packages/iplib.py to iplib.cpython-36.pyc
  File "/home/user/project/.venv/lib/python3.6/site-packages/iplib.py", line 83
    VALID_NETMASKS = {0: 0L, 1: 2147483648L, 2: 3221225472L, 3: 3758096384L,
                          ^
SyntaxError: invalid syntax

running install_scripts
copying build/scripts-3.6/cidrinfo -> /home/user/project/.venv/bin
copying build/scripts-3.6/nmconv -> /home/user/project/.venv/bin
copying build/scripts-3.6/ipconv -> /home/user/project/.venv/bin
changing mode of /home/user/project/.venv/bin/cidrinfo to 755
changing mode of /home/user/project/.venv/bin/nmconv to 755
changing mode of /home/user/project/.venv/bin/ipconv to 755
running install_egg_info
Writing /home/user/project/.venv/lib/python3.6/site-packages/iplib-1.1.egg-info

If you aren't still supporting this, do you know of another Python library that supports these functions?

is_hex(ip): Return True if the IP address is in hexadecimal notation.
is_bin(ip): Return True if the IP address is in binary notation.
is_oct(ip): Return True if the IP address is in octal notation.
is_dec(ip): Return True if the IP address is in decimal notation```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.