IP Address Function
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue Jul 7 21:54:03 EDT 2009
En Tue, 07 Jul 2009 22:45:24 -0300, Fred Atkinson <fatkinson at mishmash.com>
escribió:
> Is there a Python function I can use to get the user's IP
> address so I can display it on his browser?
There is a long distance between "Python" and "browser" - you'll have to
tell us what is in between the two.
By example, do you have a server and the user connects to it? is it
running Python? how do you run the Python application?
And why do you want to do that on the server side? Isn't easier to do that
on the client side? What about proxies? NAT?
If using CGI, look at the REMOTE_ADDR environment variable.
--
Gabriel Genellina
More information about the Python-list
mailing list