Console: Added cd and mc commands

Continues are used now, also
This commit is contained in:
Fierelier 2019-01-06 23:12:34 +01:00
parent f06ca5fc99
commit b000d6567f

View File

@ -338,14 +338,32 @@ def console():
if cmd == "exit": if cmd == "exit":
return return
if cmd.startswith("cd "):
try:
os.chdir(cmd[3:])
continue
except Exception as e:
print(e)
continue
continue
if cmd.startswith("pyc "): if cmd.startswith("pyc "):
try: try:
exec(cmd[4:]) exec(cmd[4:])
continue
except Exception as e: except Exception as e:
print(e) print(e)
else: continue
os.system(cmd)
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(): def setupVariables():
global appPath global appPath