Mulig SPAM: Re: IP address

Scripter47 nospam at riddergarn.dk
Sun Jan 28 06:19:05 EST 2007


Klaus Alexander Seistrup skrev:
> Scripter47 wrote:
> 
>> How do i get my ip address?
>>
>> in cmd.exe i just type "ipconfig" then it prints:
>>       ...
>>       IP-address . . . . . . . . . . . . . . . . . : 192.168.1.10
>>       ...
>> how can i do that in python??
> 
> #v+
> 
> python -c 'import re, urllib; print re.findall("<title>Your IP: (.+?)</title>", urllib.urlopen("http://myip.dk/").read())[0]'
> 
> #v-
> 
> Cheers,
> 
Hmm then you need Internet connecting. can i do it without that? ´

and it doesn't work either :(






More information about the Python-list mailing list