IP Address

Fredrik Lundh fredrik at pythonware.com
Thu Apr 27 06:05:04 EDT 2000


Richard Chamberlain wrote:
> Is there a way of returning the IP address of the machine that a script is
> running on?

here's one way to do it:
ip = socket.gethostbyname(socket.gethostname())

</F>





More information about the Python-list mailing list