Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25
Daniel Flick
daniel.p.flick at gmail.com
Tue Oct 17 17:17:56 EDT 2017
On Tuesday, October 17, 2017 at 12:37:03 PM UTC-5, Rob Gaddi wrote:
> On 10/17/2017 09:59 AM, Daniel Flick wrote:
> > I am very new to Python and have been struggling to find some info on processing IP addresses.
> >
> > get_network returns 192.168.1.128/25 but I need 192.168.1.128 only. I can do this with netaddr but I am working with Mako templates and ipaddress is a built in module so there are less dependencies.
> >
> > Any ideas?
> >
>
> You mean, other than .split('/')?
>
> --
> Rob Gaddi, Highland Technology -- www.highlandtechnology.com
> Email address domain is currently out of order. See above to fix.
Rob, maybe that was what I was looking for. New to Python = 4 days new! LOL. I have heard of split before so let me read up on it.
More information about the Python-list
mailing list