Skip to content
This repository was archived by the owner on Mar 1, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Compiled Python
*.pyc

# Version Checker Text File
latest.txt

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
3 changes: 1 addition & 2 deletions internal/extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class notes:
name = ("PyOS")
ver = ("1.2.1")
ver = ("2.0")
author = ("Prouser123")
helpmsg = ("Type 'help' for a list of commands.")

Expand Down Expand Up @@ -42,4 +42,3 @@ def isFloat(var):

def cls():
os.system('cls' if os.name=='nt' else 'clear')

21 changes: 16 additions & 5 deletions internal/runCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import sys
# PyOS Scripts
import internal.extra
import internal.calculator
import internal.sysinfo
import internal.update.runscript
# External Programs
import programs.calculator
import programs.sysinfo

# Commands

Expand All @@ -26,24 +28,34 @@ def help():

@staticmethod
def clear():
# Run built-in function
internal.extra.cls()

@staticmethod
def cls():
# Run built-in function
return commands.clear()

@staticmethod
def about():
# Run code below (no function necessary)
print(internal.extra.notes.name + " " + internal.extra.notes.ver)
print("Author: " + internal.extra.notes.author)

@staticmethod
def calc():
internal.calculator.start()
# Run external file
programs.calculator.app()

@staticmethod
def sysinfo():
internal.sysinfo.start()
# Run external file
programs.sysinfo.app()

@staticmethod
def updater():
# Run updater file
internal.update.runscript.app()

# Check if command is valid
def isValid(command):
Expand All @@ -56,4 +68,3 @@ def isValid(command):
else:
# Print an error
print (internal.extra.colors.FAIL + "Invalid command. " + internal.extra.notes.helpmsg + internal.extra.colors.ENDC)

Empty file added internal/update/__init__.py
Empty file.
Loading