testing '192.168.1.4' is in '192.168.1.0/24' ?

Peter Hansen peter at engcorp.com
Mon Oct 24 08:23:56 CEST 2005


bonono at gmail.com wrote:
> Is there standard library modules handling this ? currently I need to
> turn it into a long integer and do the shift and compare.

A little Googling turned up this:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440560

-Peter



More information about the Python-list mailing list