Skip to content

Commit 3419d09

Browse files
Add files via upload
1 parent c8aec31 commit 3419d09

1 file changed

Lines changed: 86 additions & 8 deletions

File tree

PythOS.py

Lines changed: 86 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@
66
@author: Charlie K.'Captain Awesome Junior'
77
"""
88

9-
# Changes in PythOS Indev 2.1.0: Added a logout option.
9+
# Changes in PythOS Indev 2.2.0: Added PythOS PRO (BETA)
1010
# To add the wait functionality, we need to import time.sleep.
1111
from time import sleep
12-
PythOS_Ver = "Indev 2.1.0"
12+
PythOS_Ver = "Alpha 1.0.0"
1313
# Here is the name data in rows 18-19.
1414
print("PythOS - The new way to use Python.")
1515
ProcessorType = 1
1616
print("Running PythOS on AMD64")
1717
fname = ""
1818
sname = ""
1919
TryNewDev = ""
20+
ActivatedPyPro = False
2021
def login():
2122
print()
2223
global fname
@@ -48,8 +49,6 @@ def load():
4849
# Now PythOS has loaded, we can create the actual operating system. But, we need to make a loop so that you can type in a command and then type in a new one.
4950

5051
while ShutDown == False:
51-
52-
print(TryNewDev)
5352
if TryNewDev == "Y":
5453
print("PythOS is shutting down so you can try PythOS Developer's Edition. Please wait...")
5554
sleep(5)
@@ -62,6 +61,8 @@ def load():
6261
print("power - Brings up power options")
6362
print("ver - Brings up info about your version of PythOS")
6463
print("settings - Lets you manage settings")
64+
if ActivatedPyPro == True:
65+
print("pro - Starts the PythOS Pro Workspace")
6566
print("launch - Opens the App Lancher, where you can open apps")
6667
UtillityOption = input("Type in your option: ")
6768
if UtillityOption == "power":
@@ -105,25 +106,101 @@ def load():
105106
elif UtillityOption == "ver":
106107
print("PythOS", PythOS_Ver)
107108
print("CONFIDETIONAL PROPERTY! If leaked, please email me at captainawesomejnr@outlook.com.au .")
108-
print("(C) Captainawesomejnr 2022. All rights reserved.")
109+
print("(C) Captainawesomejnr 2022. All rights reserved.")
110+
elif UtillityOption == "pro":
111+
if ActivatedPyPro == False:
112+
print("Hmmm... It looks like PythOS Pro cannot start.")
113+
sleep(5)
114+
if ProcessorType == 1:
115+
STOPCRASH_Run = input("""STOP!
116+
117+
A fatal error has occured and PythOS could not keep running. Due to this, PythOS was shut down to prevent damage to your installation.
118+
Fatal error cause: PythOS Pro could not start.
119+
Code: x64-01010101-01110011-01100101-01110010
120+
You can:
121+
Press ENTER to terminate the pogram. It is recomended that you do this as it is the most effective fix.
122+
OR
123+
Type 'close' to exit PythOS. You should not do this because it will abandon all unsaved data.
124+
125+
For more information, check the article about STOP! crash screens at https://www.github.com/Captain-Awesome-Jnr
126+
127+
128+
129+
130+
131+
Type in your option: """)
132+
if STOPCRASH_Run == "":
133+
print("Terminating program...")
134+
sleep(2.5)
135+
print("Sucsessfully terminated program. Returning to PythOS.")
136+
else:
137+
break
138+
elif ProcessorType == 2:
139+
STOPCRASH_Run = input("""STOP!
140+
141+
A fatal error has occured and PythOS could not keep running. Due to this, PythOS was shut down to prevent damage to your installation.
142+
Fatal error cause: User-Activated Fatal Crash
143+
Code: x86-01010101-01110011-01100101-01110010
144+
You can:
145+
Press ENTER to terminate the pogram. It is recomended that you do this as it is the most effective fix.
146+
OR
147+
Type 'close' to exit PythOS. You should not do this because it will abandon all unsaved data.
148+
149+
For more information, check the article about STOP! crash screens at https://www.github.com/Captain-Awesome-Jnr
150+
151+
152+
153+
154+
155+
Type in your option: """)
156+
if STOPCRASH_Run == "":
157+
print("Terminating program...")
158+
sleep(2.5)
159+
print("Sucsessfully terminated program. Returning to PythOS.")
160+
else:
161+
break
162+
else:
163+
import PyPRO as pro
164+
pro.run
109165
elif UtillityOption == "settings":
110166
print("SETTINGS")
111167
print("Here you can manage settings. Here are the settings you can manage:")
112168
print("1. Processor type")
169+
print("2. PythOS Pro Activation")
113170
setting = input("Which setting would you like to modify? ")
114171
if setting == "1":
115172
print("Select processor type:")
116173
print("1. 64-bit")
117174
print("2. 32-bit")
118175
processor = input("Put in your option: ")
119176
if processor == "1":
120-
print("Running PythOS on AMD64")
177+
print("Running PythOS on AMD64 or x64")
121178
ProcessorType = 1
122179
if processor == "2":
123180
print("Running PythOS on x86")
124181
ProcessorType = 2
125182
else:
126183
rerun = input("Error 3: Processor type selection didn't work. Maybe you made a typo? Press ENTER.")
184+
elif setting == "2":
185+
print("Here you can manage whether or not you want PythOS Pro.")
186+
print("WARNING: Do not turn on PythOS Pro unless you have followed the instructions in its README.txt. This can cause PythOS to crash to the extent you need to restart it!!!")
187+
activatepypro = input("""With PythOS Pro, you can:
188+
- Use the FIRST PythOS GUI
189+
- Enjoy games
190+
and MUCH, MUCH MORE!
191+
Would you like to turn PythOS Pro on? (Y/N)""")
192+
if activatepypro == "Y" or "y":
193+
sleep(0.5)
194+
ActivatedPyPro = True
195+
print("PythOS Pro is ready to be used.")
196+
elif activatepypro == "N" or "n":
197+
sleep(0.5)
198+
ActivatedPyPro = False
199+
print("PythOS Pro has been deactivated. Thank you for trying.")
200+
else:
201+
sleep(1.5)
202+
ActivatedPyPro = False
203+
print("You did not enter Y or N. For the saftey of PythOS, Pro has been deactivated.")
127204
else:
128205
rerun = input("Error 2: Setting not found. Press ENTER")
129206
elif UtillityOption == "launch":
@@ -138,7 +215,7 @@ def load():
138215
CalcOperation = input("What operation would you like to use? (* = Times, / = Divided By, ^ = Power) ")
139216
CalcSecondNumber = float(input("Type in the other number: "))
140217
if CalcOperation == "/" and CalcSecondNumber == 0:
141-
print(CalcFirstNumber, "/ 0.0: Error processing (Could not divide by 0.)")
218+
print(CalcFirstNumber, "/ 0: Error processing (Could not divide by 0.)")
142219
else:
143220
if CalcOperation == "+":
144221
print(CalcFirstNumber, "+", CalcSecondNumber, "=", CalcFirstNumber + CalcSecondNumber)
@@ -237,6 +314,7 @@ def load():
237314
print("Sucsessfully terminated program. Returning to PythOS.")
238315
else:
239316
break
240-
317+
elif UtillityOption == "$KILL$":
318+
break
241319
else:
242320
rerun = input("Error 0: The utillity you have typed is not a proper utillity option. Press ENTER")

0 commit comments

Comments
 (0)