Created
April 27, 2021 17:14
-
-
Save iamramahibrah/5a8aa2bc7b404325191ba860f56a6ece to your computer and use it in GitHub Desktop.
Systeminformation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import platform, getpass, socket | |
import os | |
#os func | |
os.system('clear') | |
def os(): | |
print("*********System Information**********") | |
node = platform.node() | |
os = platform.system() | |
ver = platform.version() | |
rel = platform.release() | |
user = getpass.getuser() | |
hostname = socket.gethostname() | |
ip = socket.gethostbyname(hostname) | |
print("Operating System: ",os,rel) | |
print("Version: ",ver) | |
print("Hostname: ",node) | |
print("Username: ",user) | |
print("Ip Address: ",ip) | |
os() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment