I was using socket.gethostbyaddr(ip)[0] but when I sent it the IP of a computer running OSX it gave me an error message. Also I'm running this on win2003 server. Since nslookup is failing to identify my macs It sounds like I may not have my DHCP set up correctly Jose
On 7/27/07, Chris Miles <[EMAIL PROTECTED]> wrote: > > > On Jul 26, 9:10 pm, "Jose Galvez" <[EMAIL PROTECTED]> wrote: > > I know that is really has nothing to do with pylons, but I know this > group > > is pretty knowledgeable. I need to get the host name from a computer, I > > know its IP address so I was using socket.gethostbyaddr(ip) which works > for > > my windows computers, however I have a computer that is running OSX and > when > > I use socket.gethostbyaddr(ip) with its IP I get 'host not found'. Ive > > edited the hostconf file adding the full hostname for the computer there > but > > it still does not work. I'm at a loss, does anyone know how to make OSX > > give me its hostname? > > Here's 2 methods: > > >>> from socket import gethostname; print gethostname() > > >>> os.uname()[1] > > Cheers, > Chris Miles > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
