Skip to content Skip to sidebar Skip to footer

How Do I Get My Computer's Fully Qualified Domain Name In Python?

I know I can use platform.node() to get my computer's network name: >>> import platform >>> platform.node() 'MyComputerName' But what I really want is something

Solution 1:

The fully qualified domain name is returned by socket.getfqdn().


Post a Comment for "How Do I Get My Computer's Fully Qualified Domain Name In Python?"