val_2=collections.Counter([(v,w) for (u,v,w,x,y,z) in people]) val_3=collections.Counter([(v,w,x) for (u,v,w,x,y,z) in people]) val_4=collections.Counter([(v,w,x,y) for (u,v,w,x,y,z) in people]) #val_5=collections.Counter([(v,w,x,y) for (u,v,w,x,y,z) in people]) i=3 for person in people: if(val_1[person[1]]==1): values.append(Text(app, text= person[0]+"\t"+str(person[1]),grid=[0,i],align="left")) elif(val_2[person[1],person[2]]==1): values.append(Text(app, text= person[0]+"\t"+str(person[1])+" "+str(person[2]),grid=[0,i],align="left")) elif(val_3[person[1],person[2],person[3]]==1): values.append(Text(app, text= person[0]+"\t"+str(person[1])+" "+str(person[2])+" "+str(person[3]),grid=[0,i],align="left")) elif(val_4[person[1],person[2],person[3],person[4]]==1): values.append(Text(app, text= person[0]+"\t"+str(person[1])+" "+str(person[2])+" "+str(person[3])+" "+str(person[4]),grid=[0,i],align="left")) else: values.append(Text(app, text= person[0]+"\t"+str(person[1])+" "+str(person[2])+" "+str(person[3])+" "+str(person[4])+" "+str(person[5]),grid=[0,i],align="left")) i+=1 app = App(title="Initiative Generator", width=250, height=500, layout="grid") box = TextBox(app,grid=[1,0]) box.hide() sub_button = PushButton(app, command=get_name, text="submit name", grid=[1,1]) sub_button.hide() name_button = PushButton(app, command=enter_names, text="enter names\t", grid=[0,0]) init_button = PushButton(app, command=init, text="generate init\t", grid=[0,1]) exit_button = PushButton(app, command=exit_, text="exit\t\t", grid=[0,2]) app.display()
text2.show() num = text2.value def prev(): subprocess.call(['libreoffice', '--view','--writer', brow.value]) def prin(): subprocess.run(['python', '/home/pi/print.py'+ num]) app = App(title="FLASH DRIVE", width=500, height=500, layout="auto") button1 = PushButton(app, command=brow, text="Browse File", align="right") brow = Text(app, text = "") brow.hide() btnpreview = PushButton(app, command=prev, text="Preview File", align="right") btnpreview.hide() btnprint = PushButton(app, command=prin, text="Print File", align="right") btnprint.hide() text1 = Text(app, text="") text1.hide() text2= Text(app,text="") text2.hide() text3=Text(app, text="") lblnumcopy=Text(app, text="Number of Copies: ") lblnumcopy.hide() copies=TextBox(app) copies.hide() app.display()
tacoB.show() tacoBB.show() change_screens_Taco.show() welcome_Message.set( "Please order a Taco, or change screens for Mac & Cheese") #welcome message, followed by GUI elements tacoA = Text(app, text="Enter Taco Quantity") tacoAA = TextBox(app) tacoB = Text(app, text="Enter Taco Flavor") tacoBB = TextBox(app) macA = Text(app, text="Enter Mac Quantity") macAA = TextBox(app) macB = Text(app, text="Enter Mac Flavor") macBB = TextBox(app) macA.hide() macAA.hide() macB.hide() macBB.hide() change_screens_Taco = PushButton(app, command=tacoScreen, text="Mac & Cheese") change_screens_Mac = PushButton(app, command=macScreen, text="Tacos") change_screens_Mac.hide() #button for roll #display app! app.display()
filename.show() app.height = 500 def save(): savet.value = app.select_file(title="Select file", folder=".", filetypes=[["All files", "."]], save=True) savet.show() app.height = 500 #Content of main window: loadfile = PushButton(app, text="Datei wählen", command=file, width="fill") addt = Text(app, text="Additionswert:", width="fill") add = TextBox(app, width="fill") convert = PushButton(app, text="Start", command=main, width="fill") counterb = PushButton(app, text="Punkte zählen", command=counter, width="fill") copybutton = PushButton(app, text="Copyright", command=copyr, width="fill") filename = TextBox(app, text="filename", width="fill") savet = Text(app, text="save", width="fill") savet.hide() saveb = PushButton(app, text="Speichern", command=save, width="fill") exit = PushButton(app, text="Beenden", command=exit, width="fill") filename.hide() copytext = Text(win, text="Copyright by Tim Jascha Fellmeden") twitter = Text(win, text="Twitter: TimJascha") github = Text(win, text="Github: timjascha") webs = Text(win, text="Website; timjascha.com") app.display()