On 15 Apr 2005 06:03:06 -0700, codecraig <[EMAIL PROTECTED]> wrote: > hi, > how can i use python to figure the ip address of the machine which > the python script is running on? I dont mean like 127.0.0.1....but i > want the external IP address (such as ipconfig on windows displays).
On Windows, this works: socket.gethostbyname(socket.gethostname()) Is that OK on real operating systems too? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list