Νίκος Gr33k <ni...@superhost.gr> writes: > Στις 5/7/2013 12:25 μμ, ο/η Νίκος Gr33k έγραψε: >> >> try: >> remadd = os.environ('REMOTE_ADDR') >> tuple3 = socket.gethostbyaddr(remadd) >> host = tuple3[0] >> except Exception as e: >> host = repr(e) > >> which yields: TypeError("'_Environ' object is not callable",) > > Any thoufgs as to why os.environ('REMOTE_ADDR') gives the above error?
Yes, I'd try to understand the error message, and eventually lookup the documentation on os.environ to see what type of object it is bound to. The solution should be easy. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- http://mail.python.org/mailman/listinfo/python-list