From e07ce515f77ad5cf56c35de48e601c1a4d51a5b6 Mon Sep 17 00:00:00 2001 From: heckeralt Date: Sun, 6 Oct 2024 18:16:05 -0400 Subject: [PATCH] Add os.py --- os.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 os.py diff --git a/os.py b/os.py new file mode 100644 index 0000000..1cf6f58 --- /dev/null +++ b/os.py @@ -0,0 +1,27 @@ +print("[AutoLogin] Logged into user root") +def hello(): + print("Hello! You've activated the hello command.") + +def help_command(): + print("This is the help command. Use --help for assistance.") + +def custom_terminal(): + commands = { + "hello": hello, + "help": help_command, + } + + print("Welcome to your custom terminal! Type 'exit' to quit.") + + while True: + command = input("$ ").strip() + + if command == "exit": + break + elif command in commands: + commands[command]() + else: + print(f"Unknown command: {command}") + +if __name__ == "__main__": + custom_terminal() \ No newline at end of file