Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get pc name with python

# credit to the Stack Overflow user in the source link

import platform
platform.node()
>>>'DARK-TOWER'

# or equivalently

import socket
socket.gethostname()
>>> 'DARK-TOWER''
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pc #python
ADD COMMENT
Topic
Name
3+3 =