On Tuesday, October 17, 2017 at 4:25:02 PM UTC-5, Daniel Flick wrote: > <SNIP> > Peter, I am not following. Are you saying that there is a function that > returns the network only? network_address was giving me the mask attached to > the end but maybe I was doing something wrong. > > For an input of LAN_IP=192.168.99.1/24 > ipaddress.IPv4Interface(LAN_IP).ip > returns 192.168.99.0/24 > > I need the 192.168.99.0 part only.
OOPS! I meant For an input of LAN_IP=192.168.99.1/24 ipaddress.IPv4Interface(LAN_IP).network returns 192.168.99.0/24 -- https://mail.python.org/mailman/listinfo/python-list