Get client ip with python
Posted
by Elad
on Stack Overflow
See other posts from Stack Overflow
or by Elad
Published on 2010-05-27T07:49:57Z
Indexed on
2010/05/27
7:51 UTC
Read the original article
Hit count: 445
Hi, I'm a newbie in python. I want to write a simple web that prints the client ip on screen
my http.conf Handler: AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On
The cgi.escape(os.environ["REMOTE_ADDR"]) return this error: KeyError: 'REMOTE_ADDR' and I just get lost with the BaseHTTPRequestHandler so what is the simple way to get the client ip? thank you.
© Stack Overflow or respective owner