dodgerfan
asked on
Get IP addres information from field
I am very new to Python. I am inserting data into a postgresql database. One field is an IP address with port (i.e., 00.00.00.00:00). I need to take the IP address and pit it in one database field then take the port and put it in another database field. The IP addresses can be either ipv4 or ipv6, and I need to handle it the same way regardless of whether it is ipv4 or ipv6. How can I get this working properly? Any help is appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry I noticed that when I originally posted my answer I had forgotten to put the port number in my example. I have now updated it.
ASKER
Thank you for the help. That works.