repl.it
@JerryTheMouse/

Cmd Line OS

Python

No description

fork
loading
Files
  • main.py
  • log.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import time

infiniteLoop = 1
prbt = {'run': 'start', 'end': 'end'}
exit = False
OuterShell = None 
autoBoot = True

# log = open("log.txt", "r+")
tempmsg = "Sorry, but Magick is currently under development with user storage system. You may continue to OS features as Guest."

# def logtest():
  # Test for log.txt:
  # log.write("This is a test")
  # print(log.read())
# logtest()

def preboot():
  # Run before boot operations
  runpreboot()

def runpreboot():
  print ("Starting OuterShell Management Software/System Tools...")
  if autoBoot == True:
    print("Autoboot. Quick, easy, simple. Starting system.")
    for cmd in prbt:
      if cmd == 'end':
        break
      if cmd == 'run':
        print("Running " + prbt[cmd] + " ...")
        if prbt[cmd] == 'start':
          print ("Activating ...")
          exit = True
          print ("Exiting Outershell Management Software/System Tools... entering main OS") 
  else:
    OuterShell = input(f"OuterShell launched at {time}. Type 'help' for help...\n>>>")

def setup(opt):
  if opt == 'tempMsg' :
    print(tempmsg)
  else:
    hasAcc = input("Do you have an Magick account yet? Enter [y]es if you already have a Magick account. Otherwse, enter [n]o. ")
    if hasAcc and hasAcc.lower() == 'y':
      print ("Okay, please proceed with your account sign-in and Magick will do its magic.") 
      # Sign in code here
      print("Thanks for logging in, we're just setting up your system...")

  poweroff = False
  time = time.time()
  exit = 0

  while not exit:
    preboot()
    if OuterShell == 'help':
      print ("Help Center > OuterShell\nSystem Action")
    if exit == True:
      break

  while not poweroff:
    print("Welcome to C(K)inetic DOS (Cmd Line OS).")
    # setup()
    setup('tempMsg')
    
?