ifconfig in python
Дамјан Георгиевски
gdamjan at gmail.com
Mon Jan 19 22:42:51 EST 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