#!python
"""
MIT License

Copyright (c) 2017 Theuns Alberts
"""
import sys

import hexip


if __name__ == "__main__":
    if len(sys.argv) != 2:
        print "Usage: hexip <IP4 address>"
    else:
        try:
            ipstr = sys.argv[1]
            hipstr = hexip.ip4_to_hex(ipstr)
            print "%s = %s" % (ipstr, hipstr)
        except Exception as e:
            print "Error! Exception: %s" % e
