From b000d6567ffff7bf597322293bc97fe38b5d8e34 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Sun, 6 Jan 2019 23:12:34 +0100 Subject: [PATCH] Console: Added cd and mc commands Continues are used now, also --- UniversalModloader.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/UniversalModloader.py b/UniversalModloader.py index 7193c02..0b1ac41 100644 --- a/UniversalModloader.py +++ b/UniversalModloader.py @@ -338,14 +338,32 @@ def console(): if cmd == "exit": return + if cmd.startswith("cd "): + try: + os.chdir(cmd[3:]) + continue + except Exception as e: + print(e) + continue + continue + if cmd.startswith("pyc "): try: exec(cmd[4:]) + continue except Exception as e: print(e) - else: - os.system(cmd) + continue + if cmd.startswith("mc "): + try: + cloneFolder(cmd[3:],cmd[3:] + " - clone",True,False) + continue + except Exception as e: + print(e) + continue + + os.system(cmd) def setupVariables(): global appPath