def main(): # Create window win = GraphWin("Vault Breaker", 500, 600) win.setBackground('grey70') win.setCoords(0, 0, 10, 12) window(win)
def main(): # Create window win = GraphWin("Vault Breaker", 500, 600) win.setBackground('grey70') win.setCoords(0, 0, 10, 12) lol = window(win) ## for i in range(10): ## ## num = eval(input("Enter number here: ")) window.room1MiniMap(lol) time.sleep(2) firescroll.addInventory(lol) window.addInventory(lol, "tele") print("tele added: 1") time.sleep(2) firescroll.addInventory(lol) window.addInventory(lol, "tele") print("tele added: 2") time.sleep(2) firescroll.delInventory(lol) window.delInventory(lol, "tele") print("tele deleted: 1") time.sleep(2) firescroll.delInventory(lol) window.delInventory(lol, "tele") print("tele deleted: 0")
def validate(self, event=None): #Dictionary for list of users (username : password) userid = {} users = {} role = {} keys = CRUD.retrieve_employee() #Saves the input for username and pasword username = self.userName.get() Pass = self.password.get() for key in keys: if (username == key[1]): if (Pass == key[2]): self.promptWindow.destroy() hid = util.history() print(hid) _time = datetime.now().strftime("%H:%M:%S") _date = date.today().strftime("%m/%d/%y") _date = util.date_split(_date) CRUD.add_history(str(hid), 'sign', key[0], 'logged in ' + str(username), _date, _time) home = window(key) home.root.mainloop() else: self.label3.configure(text="Incorrect Password") # Displays error if incorrect password self.label3.grid(column=0, row=6) try: self.label3.configure(text="Username does not exist") # Displays error nonexistent username self.label3.grid(column=0, row=6) except TclError: pass
from psychopy import visual from Window import window window = window() win = window.win class MainAssets(object): questionMark = visual.ImageStim(win, image='Images/questionMark.png', pos=[-60, 75], units='pix', size=[140, 210]) correct = visual.ImageStim(win, image='Images/correct.png', pos=[-60, 75], units='pix', size=[80, 80]) wrong = visual.ImageStim(win, image='Images/wrong.png', pos=[-60, 75], units='pix', size=[80, 80]) fixationPoint = visual.ImageStim(win, image='images/fixationPoint.png', pos=[-90, 75], units='pix', size=[300, 400])
from CongruentAligned import Congruent_Aligned from CongruentMisaligned import Congruent_Misaligned from IncongruentAligned import Incongruent_Aligned from IncongruentMisaligned import Incongruent_Misaligned from psychopy import event, monitors from DialogueBox import dialoguebox import os from Window import window import random win = window().win # subjectInfo = dialoguebox().showDialogBox() # mainrandom = random.randint(0, 3) event.globalKeys.clear() event.globalKeys.add(key='q', func=os._exit, func_args=[1], func_kwargs=None) m_counter = 0 f_counter = 0 typeOneDone = False typeTwoDone = False typeThreeDone = False typeFourDone = False while True: mainrandom = random.randint(1, 4) print('main random: ' + str(mainrandom))