Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Boot prompt and OS
#1
boot prompt:
import time
import random
import os

for x in range(90):
    print("")

while True:
    user = input('boot from: ')
    if user == 'XC_DOS':
        print("trying to boot from XC_DOS.bpf...")
        time.sleep(5)
        for x in range(99):
            print("")
        print("                                                                                      XC DOS")

        for x in range(25):
            print("")
        print("starting up...")
        for x in range(20):
            print("=", end='', flush=True)
            time.sleep(0.1)
            print("=", end='', flush=True)
            time.sleep(0.2)
            print("=", end='', flush=True)
            time.sleep(0.4)
            print("=", end='', flush=True)
            time.sleep(0.2)
            print("=", end='', flush=True)
            time.sleep(0.3)
            print("=", end='', flush=True)
            time.sleep(0.1)
            print("=", end='', flush=True)
            time.sleep(0.2)
            print("=", end='', flush=True)
            time.sleep(0.1)
            print("=", end='', flush=True)

        print("=")
        time.sleep(1)
        end = time.sleep(3)

        time.sleep(3)
        for x in range(99):
            print("")
        while True:
            user = input('Your username goes here: ')
            if user == 'Adrian':
                for x in range(90):
                    print("")
                passwd = input('Your password goes here: ')
                if passwd == 'password1':
                    print("")
                    for x in range(90):
                        print("")
                    print(f'{user}, you are now logged in. This message will be displayed for 5 seconds.')
                    time.sleep(5)
                    print("mini command line v1.0.0")
                    print("type help for a list of commands.")
                    for x in range(99):
                        print("")

                    print("XC DOS shell")
                    print("type help for a list of commands.")
                    print("(C) coppyright Virsatech corp")


                    def commandline():
                        commandline = input("C:\\system\\commands>")
                        return commandline


                    commands = ["help", "dir", "exit", "vson", "N.E.P.T.E.R"]

                    commandline_string = ""
                    while commandline_string != "exit":
                        commandline_string = commandline()

                        if not commandline_string in commands and commandline_string != "":
                            print(
                                "Unable to run command. Please check that the command exists and that you have permission to use it.")

                        if commandline_string == "help":
                            print("These are the valid commands")
                            for command in commands:
                                print(command)

                        elif commandline_string == "dir":
                            files = os.listdir("/")
                            for file in files:
                                print(file)

                        elif commandline_string == "vson":
                            print("XC DOS 1.2.0")
                            print("(C)coppyright Virsatech corp")

                        elif commandline_string == "N.E.P.T.E.R":
                            for x in range(10):
                                import random

                                drinks = ["F3#$%S4", "f#$f34#", "D50w9#f", "F#$f34F", "#$i5iS", "F3Fwjis3##w",
                                          "f##f#fwg#345f^d6", "e%d3h4Hw4", "cT46$^s56_3", "3F#$f34F_E$_"]

                                drink1 = random.choice(drinks)
                                drink2 = random.choice(drinks)
                                drink3 = random.choice(drinks)
                                print(drink1)
                                print(drink2)
                                print(drink3)
                                if drink1 == drink2 and drink2 == drink3:
                                    print("Jackpot! And you win $3785934758394758937485934857489345739!")
                                    redo = input("wanna do another round? [Y/N]")
                                    if redo == "y":
                                        import random

                                        drinks = ["f#%s45", "f3f39$", "f4jf$#", "f#%3f4", "3FS4d#$", "3F#5F%d5"]

                                        drink1 = random.choice(drinks)
                                        drink2 = random.choice(drinks)
                                        drink3 = random.choice(drinks)
                                        print(drink1)
                                        print(drink2)
                                        print(drink3)



                        elif commandline_string == "exit":
                            print("A critical error occoured.")
                            print("error code: 000013FS42x00")
                            print("Returning to MacOS to avoid further damage...")
                            print("done.")
                            print(
                                "Please input Boot path to run this or something else. The path may look like this: /Users/Virsatech/PycharmProjects/maze_script/venv/bin/python /Users/Virsatech/PycharmProjects/maze_script/XC_DOS.py")



                    break
                else:
                    print(f'{passwd} is not a valid password. Please try again.')
                    continue
            else:
                print('{user} is not a valid username. Please try again.')
                continue
    else:
        print(f'{user} is not a valid .bpf file. Please try again.')
        continue
OS:
import random
import os
import time
from time import sleep
for x in range(99):
    print("")
print("                                                                                      XC DOS")

for x in range(25):
    print("")
print("starting up...")
for x in range(20):
    print("=", end='', flush=True)
    time.sleep(0.1)
    print("=", end='', flush=True)
    time.sleep(0.2)
    print("=", end='', flush=True)
    time.sleep(0.4)
    print("=", end='', flush=True)
    time.sleep(0.2)
    print("=", end='', flush=True)
    time.sleep(0.3)
    print("=", end='', flush=True)
    time.sleep(0.1)
    print("=", end='', flush=True)
    time.sleep(0.2)
    print("=", end='', flush=True)
    time.sleep(0.1)
    print("=", end= '', flush=True)

print("=")
time.sleep(1)
end= time.sleep(3)

time.sleep(3)
for x in range(99):
    print("")
while True:
    user = input('Your username goes here: ')
    if user == 'Adrian':
        for x in range(90):
            print("")
        passwd = input('Your password goes here: ')
        if passwd == 'password1':
            print("")
            for x in range(90):
                print("")
            print(f'{user}, you are now logged in. This message will be displayed for 5 seconds.')
            time.sleep(5)
            print("mini command line v1.0.0")
            print("type help for a list of commands.")
            for x in range(99):
                print("")

            print("XC DOS shell")
            print("type help for a list of commands.")
            print("")


            def commandline():
                commandline = input("command>")
                return commandline


            commands = ["help", "dir", "exit", "vson", "N.E.P.T.E.R"]

            commandline_string = ""
            while commandline_string != "exit":
                commandline_string = commandline()

                if not commandline_string in commands and commandline_string != "":
                    print(
                        f"Unable to run {commandline_string}. Please check that the command exists and that you have permission to use it.")

                if commandline_string == "help":
                    print("These are the valid commands")
                    for command in commands:
                        print(command)

                elif commandline_string == "dir":
                    files = os.listdir("/")
                    for file in files:
                        print(file)

                elif commandline_string == "vson":
                    print("XC DOS 1.2.0")
                    print("")

                elif commandline_string == "N.E.P.T.E.R":
                    for x in range(10):
                        import random

                        drinks = ["F3#$%S4", "f#$f34#", "D50w9#f", "F#$f34F", "#$i5iS", "F3Fwjis3##w", "f##f#fwg#345f^d6", "e%d3h4Hw4", "cT46$^s56_3", "3F#$f34F_E$_"]

                        drink1 = random.choice(drinks)
                        drink2 = random.choice(drinks)
                        drink3 = random.choice(drinks)
                        print(drink1)
                        print(drink2)
                        print(drink3)
                        if drink1 == drink2 and drink2 == drink3:
                            print("Jackpot! And you win $3785934758394758937485934857489345739!")
                            redo = input("wanna do another round? [Y/N]")
                            if redo == "y":
                                import random

                                drinks = ["f#%s45", "f3f39$", "f4jf$#", "f#%3f4", "3FS4d#$", "3F#5F%d5"]

                                drink1 = random.choice(drinks)
                                drink2 = random.choice(drinks)
                                drink3 = random.choice(drinks)
                                print(drink1)
                                print(drink2)
                                print(drink3)



                elif commandline_string == "exit":
                    print("A critical error occoured.")
                    print("error code: 000013FS42x00")
                    print("Returning to MacOS to avoid further damage...")
                    print("done.")
                    print("Please input Boot path to run this or something else. The path may look like this: /Users/Virsatech/PycharmProjects/maze_script/venv/bin/python /Users/Virsatech/PycharmProjects/maze_script/XC_DOS.py")
            break
        else:
            print('Wrong password. Please try again.')
            continue
    else:
        print('Wrong username. Please try again.')
        continue
Reply
#2
A little explanation of what this does would be helpful.
Reply
#3
(Apr-02-2021, 01:24 AM)Larz60+ Wrote: A little explanation of what this does would be helpful.

As I always do as a moderator says, I guess I will add an explanation of them.

So the OS is sort of like MS-DOS but different. It has a different design and just is different in general. Though this thing can only run in a command line, or anything that runs python scripts. The boot prompt is like a dual boot tool. Again it only runs in anything that runs python scripts. But it allows you to add your own operating systems, or add other people's OS's. And I am releasing an update to it soon.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020