ip address?

maximilianscherr MaximilianScherr at T-Online.de
Sat Jan 26 14:02:01 EST 2002


thanks,

hmm, i have found another possibility to do it

(note that im a total newbie)i noticed my gethostname() 
returns "maximilian-1" and if i do a getfqdn() i get MAXIMILIAN, so 
it cuts something off, is there a limit of 10 chars and uppercase for 
fqdns?
if yes, i could do a gethostbyname_ex(myaddr that i got with the old 
way could be any if there are more), then i take the first part of 
the triple(though i don't know how to handle tuples and triples, like 
lists?) and do a gethostbyaddr() and then read that out.
the trick is: internet domains you get are normally longer than 10 
chars, right?, and i could in addition check if they are totally 
uppercase(how??). so then i just check all that for all the ips i got 
before,
and if the hostname is not only uppercase and len is bigger then 10, 
i got the right address.





More information about the Python-list mailing list