need to convert IP address to unsigned long using Python. In C++ code I do this using
boost::asio::ip::address_v4::from_string("127.0.0.1").to_ulong()
Output: 2130706433
In Python so far I have been able to convert this to hex but not to ulong.
>>> socket.inet_aton('127.0.0.1')
'\x7f\x00\x00\x01'
Can you please help me with conversion of IP to ulong in Python?