Στις 5/7/2013 12:21 μμ, ο/η Dave Angel έγραψε:
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/local/lib/python3.3/os.py", line 669, in __getitem__
     value = self._data[self.encodekey(key)]
KeyError: b'REMOTE_ADDR


Wait!
Are you saying that the ip address is being returned as a byte string which then i have to decode with something like:

host = socket.gethostbyaddr( os.environ['REMOTE_HOST'].decode('utf-8') )[0]

?

--
What is now proved was at first only imagined!
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to