forked from JaydenMW/pclish
Update 'shell.py'
This commit is contained in:
parent
d3e22d4f0c
commit
406b0c71ba
19
shell.py
19
shell.py
|
@ -9,6 +9,10 @@ import getpass
|
||||||
# Get System Information
|
# Get System Information
|
||||||
RAM = psutil.virtual_memory()
|
RAM = psutil.virtual_memory()
|
||||||
CPU = platform.processor()
|
CPU = platform.processor()
|
||||||
|
OS = os_name = platform.system()
|
||||||
|
|
||||||
|
# Shell Version
|
||||||
|
VER = "PCLISH v0.0.3.8a"
|
||||||
|
|
||||||
# Command Interpretation -- This is the core of the shell
|
# Command Interpretation -- This is the core of the shell
|
||||||
def execute_command(command):
|
def execute_command(command):
|
||||||
|
@ -61,17 +65,22 @@ def pclish_echo():
|
||||||
print(txt)
|
print(txt)
|
||||||
|
|
||||||
def pclish_help():
|
def pclish_help():
|
||||||
print("pclish: here are the commands available
|
print("""pclish: here are the commands available
|
||||||
help: shows this page
|
help: shows this page
|
||||||
cd: change directory
|
cd: change directory
|
||||||
ver: displays shell version
|
ver: displays shell version
|
||||||
ls: lists files in current dir")
|
ls: lists files in current dir
|
||||||
|
system: shows system information
|
||||||
|
mkdir: creates a directory
|
||||||
|
shtdwnsubsys: shuts down the sub system
|
||||||
|
|
||||||
|
note: you have to type mkdir by its self then it will ask for what you want to name the directory""")
|
||||||
|
|
||||||
def pclish_ls():
|
def pclish_ls():
|
||||||
print("pclish: this feature is not yet supported")
|
print("pclish: this feature is not yet supported")
|
||||||
|
|
||||||
def pclish_ver():
|
def pclish_ver():
|
||||||
print("pclish: version 0.0.2a.")
|
print(VER)
|
||||||
|
|
||||||
def pclish_mkdir():
|
def pclish_mkdir():
|
||||||
value = input("What would you like to name this new directory:\n")
|
value = input("What would you like to name this new directory:\n")
|
||||||
|
@ -84,6 +93,10 @@ def pclish_system():
|
||||||
print(RAM)
|
print(RAM)
|
||||||
print("CPU:")
|
print("CPU:")
|
||||||
print(CPU)
|
print(CPU)
|
||||||
|
print("OS:")
|
||||||
|
print(OS)
|
||||||
|
print("Shell:")
|
||||||
|
print(VER)
|
||||||
|
|
||||||
|
|
||||||
def pclish_shtdwnsubsys():
|
def pclish_shtdwnsubsys():
|
||||||
|
|
Loading…
Reference in New Issue