Search
 
SCRIPT & CODE EXAMPLE
 

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''
Comment

python get computer name

import platform
platform.node()
Comment

PREVIOUS NEXT
Code Example
Python :: on click on image pygame 
Python :: flask mail 
Python :: python unit testing machine learning 
Python :: drf default pagination 
Python :: The operands of the logical operators should be boolean expressions, but Python is not very strict. Any nonzero number is interpreted as True. 
Python :: scrfoll with selenium python 
Python :: how to get all folders on path in python 
Python :: how to playsound in python 
Python :: turtle write 
Python :: python sorted lambda 
Python :: read excel file spyder 
Python :: star operator python 
Python :: sns palette 
Python :: label encoding column pandas 
Python :: label encoding 
Python :: import subdirectory python 
Python :: primary key django model 
Python :: create python file kali linux 
Python :: read live video from usb opencv python 
Python :: python run system command 
Python :: Concat and Append DFs Python 
Python :: rotate image by specific angle opencv 
Python :: how to run django tests 
Python :: google smtp 
Python :: pandas convert multiple columns to categorical 
Python :: python remove new line 
Python :: uniform distribution python example 
Python :: get month name from datetime pandas 
Python :: 3d array in numpy 
Python :: python 64 bit 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =