forked from JaydenMW/pclish
Update shell.py
This commit is contained in:
parent
02f29e55cf
commit
bb8e0f52e5
23
shell.py
23
shell.py
|
@ -6,8 +6,8 @@ import socket
|
||||||
|
|
||||||
RAM = psutil.virtual_memory()
|
RAM = psutil.virtual_memory()
|
||||||
CPU = platform.processor()
|
CPU = platform.processor()
|
||||||
OS = os_name = platform.system()
|
OS = platform.system()
|
||||||
|
HOST = socket.gethostname()
|
||||||
VER = "PCLISH v0.0.5a-hotfix2a"
|
VER = "PCLISH v0.0.5a-hotfix2a"
|
||||||
|
|
||||||
PROMPT = "shell@localhost$ "
|
PROMPT = "shell@localhost$ "
|
||||||
|
@ -36,7 +36,7 @@ def execute_command(command):
|
||||||
try:
|
try:
|
||||||
subprocess.run(cmd.strip().split())
|
subprocess.run(cmd.strip().split())
|
||||||
except Exception:
|
except Exception:
|
||||||
print("pclish: command not found: {}".format(cmd.strip()))
|
print("pclish: command not found, run the help command for a list of commands: {}".format(cmd.strip()))
|
||||||
|
|
||||||
os.dup2(s_in, 0)
|
os.dup2(s_in, 0)
|
||||||
os.dup2(s_out, 1)
|
os.dup2(s_out, 1)
|
||||||
|
@ -84,19 +84,16 @@ def pclish_mkdir():
|
||||||
os.mkdir(DIR)
|
os.mkdir(DIR)
|
||||||
|
|
||||||
def pclish_system():
|
def pclish_system():
|
||||||
print("System: XCU Python Based Shell Env")
|
print("HOSTNAME:" + HOST)
|
||||||
print("RAM:")
|
print("System: PCLISH SUBSYSTEM")
|
||||||
print(RAM)
|
print("RAM:" + RAM)
|
||||||
print("CPU:")
|
print("CPU:" + CPU)
|
||||||
print(CPU)
|
print("OS:" + OS)
|
||||||
print("OS:")
|
print("SHELL:" + VER)
|
||||||
print(OS)
|
|
||||||
print("Shell:")
|
|
||||||
print(VER)
|
|
||||||
|
|
||||||
|
|
||||||
def pclish_shtdwnsubsys():
|
def pclish_shtdwnsubsys():
|
||||||
print("Shutting Down XCU Python Based Shell Env")
|
print("Exiting to..." + OS)
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in New Issue