ip address and network
Peter Hansen
peter at engcorp.com
Thu Oct 23 10:34:59 EDT 2003
Ruslan Spivak wrote:
>
> I need to do the following:
> i have ip address(a lot of different ip addresses) and i need to
> determine if it belongs to some network. (for example ip -
> 193.108.240.17, network 193.108.240.0/22).
> How can i solve this?
Are you asking how to deal with this in Python code specifically, or
are you asking for help with the general problem? In other words,
do you understand what /22 means and what it means to "belong to
a network"? (If you do, this is fairly straightforward, so perhaps
you could explain what part of doing it in Python is unclear to you.)
-Peter
More information about the Python-list
mailing list