I don't know about getting the port, but you should have this at the top of your file if you want to use the "os" module:
import os On Jan 28, 4:14 pm, Huan <[email protected]> wrote: > I know I can get the requester's IP address by > self.request.remote_addr, but how do I get the requester's TCP port > number? I tried self.request.remote_port, but that does not work. > > I also saw people using os.environ['REMOTE_ADDR'], so I was thinking > of trying os.environ['REMOTE_PORT'], but it gives me an error saying > "NameError: global name 'os' is not defined". Any idea what I are > doing wrong? How do I define the global name 'os'? > > Many thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
