Discuss Scratch
- Discussion Forums
- » Things I'm Making and Creating
- » Dos Operating System in Python 3 (SimpleDos)
- knarfjack
- Scratcher
100+ posts
Dos Operating System in Python 3 (SimpleDos)
It's pretty simple at the moment.
I'll add more soon.
Commands:
LT - Lists the current directory
CSCR - Clears the screen
SD - Shuts down SimpleDos
I'll add more soon.
Commands:
LT - Lists the current directory
CSCR - Clears the screen
SD - Shuts down SimpleDos
from time import sleep from os import system, name booted = False def cscr(): # for windows if name == 'nt': comand = system('cls') # for mac and linux else: comand = system('clear') cscr() print("SimpleDos is booting up.") print("Please wait...") sleep(5) booted = True cscr() while (booted == True): cmd = input("C:\\") if (cmd == "lt"): print("There are no files in this directory") elif (cmd == "cscr"): cscr() elif (cmd == "sd"): print("SimpleDos is now shutting down...") sleep(2) booted = False cscr() exit() else: print("Not a valid command") print("\a")
Last edited by knarfjack (April 4, 2022 02:11:58)
Linux Mint 21.1 Cinnamon (64-bit) Brave Version 1.52.129 Chromium: 114.0.5735.198 (64-bit)
- knarfjack
- Scratcher
100+ posts
Dos Operating System in Python 3 (SimpleDos)
bump
Linux Mint 21.1 Cinnamon (64-bit) Brave Version 1.52.129 Chromium: 114.0.5735.198 (64-bit)
- knarfjack
- Scratcher
100+ posts
Dos Operating System in Python 3 (SimpleDos)
bump
Linux Mint 21.1 Cinnamon (64-bit) Brave Version 1.52.129 Chromium: 114.0.5735.198 (64-bit)
- Discussion Forums
- » Things I'm Making and Creating
- » Dos Operating System in Python 3 (SimpleDos)