IP address

Gabriel Genellina gagsl-py at yahoo.com.ar
Sun Jan 28 20:41:30 EST 2007


At Sunday 28/1/2007 10:28, Colin J. Williams wrote:

>Klaus Alexander Seistrup wrote:
> >
> > python -c 'import re, urllib; print re.findall("<title>Your IP: 
> (.+?)</title>", urllib.urlopen("http://myip.dk/").read())[0]'
> >
>
>Your one-liner doesn't work for me, with Windows XP, but the following

On XP you should switch the usage of " and ' (double quotes are used 
to enclose command arguments with embedded spaces):

python -c "import re, urllib; print re.findall('<title>Your IP: 
(.+?)</title>', urllib.urlopen('http://myip.dk/').read())[0]"


-- 
Gabriel Genellina
Softlab SRL 


	

	
		
__________________________________________________ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 




More information about the Python-list mailing list