Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- hostname = socket.gethostname()
- IPAddr = socket.gethostbyname(hostname)
- print("Your Computer Name is:" + hostname)
- print("Your Computer IP Address is:" + IPAddr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement