IPy module

David Murmann david.murmann at rwth-aachen.de
Fri Feb 3 22:57:28 EST 2006


yawgmoth7 schrieb:
> I was discussing this in another email, sadly I have misplaced the
> email. I got the module IPy, and I am taking a variable from the
> user(An IP) and doing something like this:
> 
> startip = raw_input("Enter start IP: ")
> ip = IPy.IP(startip\255)
> for x in ip():
>    <Do neat stuff>
> 
> Well, this doesn't work(I knew it wouldn't but i had to give it a try.
> Since, this has to be a value from the user, and It has to have a
> range(Hence the \255 part). How could I do this using IPy? Thank you
> for your time.

it is absolutely not clear what you want. what should \255 do? replace
the last part of the ip with 255? if so, why do you want to do that?
what do you expect the user to input? if he enters, for example,
192.168.1.2, which ip-addresses do you expect to get in the loop?

i have no clue what you want to do, sorry.

--
David.



More information about the Python-list mailing list