ifconfig in python

Дамјан Георгиевски gdamjan at gmail.com
Tue Jan 20 04:42:51 CET 2009


Something *like*  this could work:

	myip = urllib2.urlopen('http://whatismyip.org/').read()

of course then you are depending on an external service, not a very 
reliable one even. But then again, you might create an internal service
like that yourself.

This cgi-bin shell code like this for ex:

#! /bin/sh
echo "Content-type: text/plain"
echo
echo "${REMOTE_ADDR}"


-- 
дамјан ( http://softver.org.mk/damjan/ )

Spammers scratch here with a diamond to find my address:
|||||||||||||||||||||||||||||||||||||||||||||||



More information about the Python-list mailing list