You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PythOS.py
+86-8Lines changed: 86 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,18 @@
6
6
@author: Charlie K.'Captain Awesome Junior'
7
7
"""
8
8
9
-
# Changes in PythOS Indev 2.1.0: Added a logout option.
9
+
# Changes in PythOS Indev 2.2.0: Added PythOS PRO (BETA)
10
10
# To add the wait functionality, we need to import time.sleep.
11
11
fromtimeimportsleep
12
-
PythOS_Ver="Indev 2.1.0"
12
+
PythOS_Ver="Alpha 1.0.0"
13
13
# Here is the name data in rows 18-19.
14
14
print("PythOS - The new way to use Python.")
15
15
ProcessorType=1
16
16
print("Running PythOS on AMD64")
17
17
fname=""
18
18
sname=""
19
19
TryNewDev=""
20
+
ActivatedPyPro=False
20
21
deflogin():
21
22
print()
22
23
globalfname
@@ -48,8 +49,6 @@ def load():
48
49
# 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.
49
50
50
51
whileShutDown==False:
51
-
52
-
print(TryNewDev)
53
52
ifTryNewDev=="Y":
54
53
print("PythOS is shutting down so you can try PythOS Developer's Edition. Please wait...")
55
54
sleep(5)
@@ -62,6 +61,8 @@ def load():
62
61
print("power - Brings up power options")
63
62
print("ver - Brings up info about your version of PythOS")
64
63
print("settings - Lets you manage settings")
64
+
ifActivatedPyPro==True:
65
+
print("pro - Starts the PythOS Pro Workspace")
65
66
print("launch - Opens the App Lancher, where you can open apps")
66
67
UtillityOption=input("Type in your option: ")
67
68
ifUtillityOption=="power":
@@ -105,25 +106,101 @@ def load():
105
106
elifUtillityOption=="ver":
106
107
print("PythOS", PythOS_Ver)
107
108
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
+
elifUtillityOption=="pro":
111
+
ifActivatedPyPro==False:
112
+
print("Hmmm... It looks like PythOS Pro cannot start.")
113
+
sleep(5)
114
+
ifProcessorType==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
+
ifSTOPCRASH_Run=="":
133
+
print("Terminating program...")
134
+
sleep(2.5)
135
+
print("Sucsessfully terminated program. Returning to PythOS.")
136
+
else:
137
+
break
138
+
elifProcessorType==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
+
ifSTOPCRASH_Run=="":
157
+
print("Terminating program...")
158
+
sleep(2.5)
159
+
print("Sucsessfully terminated program. Returning to PythOS.")
160
+
else:
161
+
break
162
+
else:
163
+
importPyPROaspro
164
+
pro.run
109
165
elifUtillityOption=="settings":
110
166
print("SETTINGS")
111
167
print("Here you can manage settings. Here are the settings you can manage:")
112
168
print("1. Processor type")
169
+
print("2. PythOS Pro Activation")
113
170
setting=input("Which setting would you like to modify? ")
114
171
ifsetting=="1":
115
172
print("Select processor type:")
116
173
print("1. 64-bit")
117
174
print("2. 32-bit")
118
175
processor=input("Put in your option: ")
119
176
ifprocessor=="1":
120
-
print("Running PythOS on AMD64")
177
+
print("Running PythOS on AMD64 or x64")
121
178
ProcessorType=1
122
179
ifprocessor=="2":
123
180
print("Running PythOS on x86")
124
181
ProcessorType=2
125
182
else:
126
183
rerun=input("Error 3: Processor type selection didn't work. Maybe you made a typo? Press ENTER.")
184
+
elifsetting=="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
+
ifactivatepypro=="Y"or"y":
193
+
sleep(0.5)
194
+
ActivatedPyPro=True
195
+
print("PythOS Pro is ready to be used.")
196
+
elifactivatepypro=="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.")
127
204
else:
128
205
rerun=input("Error 2: Setting not found. Press ENTER")
129
206
elifUtillityOption=="launch":
@@ -138,7 +215,7 @@ def load():
138
215
CalcOperation=input("What operation would you like to use? (* = Times, / = Divided By, ^ = Power) ")
139
216
CalcSecondNumber=float(input("Type in the other number: "))
140
217
ifCalcOperation=="/"andCalcSecondNumber==0:
141
-
print(CalcFirstNumber, "/ 0.0: Error processing (Could not divide by 0.)")
218
+
print(CalcFirstNumber, "/ 0: Error processing (Could not divide by 0.)")
0 commit comments