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 :(



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to