Categories
How to get PC name in Python?
It seems that you can find out using the os library
Answer the question
In order to leave comments, you need to log in
import socket print(socket.gethostname())
import platform print(platform.node())
import os print(os.uname()[1])
You can use the standard os library os.getusername()
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question