Am Freitag, 5. Juli 2013 10:00:21 UTC+2 schrieb Νίκος Gr33k: > ... > I'am not sure how iam supposed to write this: i just tried this: > try: > remadd = os.environ('REMOVE_ADDR') > tuple3 = socket.gethostbyaddr(remadd) > host = tuple3[0] > except: > host = type(remadd) + " : " + repr(remadd)
Hey, if no one told you before: You are allowed to read what other people suggest you to do, think about it and so correct obvious typos: 'REMO*V*E_ADDR' By the way, my i cite: Am Donnerstag, 4. Juli 2013 14:52:59 UTC+2 schrieb Νίκος Gr33k: > ... > '108.162.229.97' is the result of: > print( ascii(os.environ['REMOTE_ADDR']) ) Am Donnerstag, 4. Juli 2013 16:48 UTC+2 schrieb Νίκος Gr33k: > For me, socket.gethostbyaddr('108.162.229.97') raises socket.herror, > which is also a subclass of OSError from Python 3.3 onwards. -- http://mail.python.org/mailman/listinfo/python-list