Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Created on Fri May 24 13:37:36 2019
- @author: Llama
- """
- from pickle import load
- from sys import path
- path.append("..")
- import functions
- # main code
- try:
- users = open("data//users.csms", "rb")
- except FileNotFoundError:
- functions.restoreUsers()
- else:
- userlist = load(users)
- users.close()
- functions.clear()
- try:
- currUser, rootDir, currDir = functions.startup(userlist)
- except FileNotFoundError:
- print("Error happened during startup")
- functions.restoreFiles()
- msg = ""
- while "Everyone except Cosmic47 is gay":
- functions.clear()
- print(currDir.name)
- functions.listdir(currDir)
- print(msg)
- inp = input("input command >")
- command = inp.split(" ")[0]
- if command == "moveto" or command == "mvback":
- output = functions.comm(inp, currDir, currUser.access, rootDir)
- if type(output) is str:
- msg = output
- else:
- currDir = output
- else:
- msg = functions.comm(inp, currDir, currUser.access, rootDir)
- if msg == "exiting...":
- break
- functions.save(userlist, rootDir)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement