Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

Abdur-Rahmaan Janhangeer arj.python at gmail.com
Tue Oct 17 14:51:27 EDT 2017


any idea why this is on spam ?

Abdur-Rahmaan Janhangeer,
Mauritius
abdurrahmaanjanhangeer.wordpress.com

On 17 Oct 2017 21:00, "Daniel Flick" <daniel.p.flick at gmail.com> 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?
> --
> https://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list