Exemple #1
0
def main(root):
	function.clear(root)
	file=open("menutitles.txt","r")
	sub=file.readlines()
	Label(root,text="21 Days",font=32).grid(0,0)
	textn=random.randint(0,15)
	txt=sub[textn]
	if("EASTER" in txt):
		Button(root,text="Easter Egg Button",command=misc.easteregg()).grid(row=3,column=0)
	else:
		Button(root,text="Easter Egg Button",command=).grid(row=3,column=0)
	Button(root,text=txt,font=12,command=textn+=1).grid(row=1,column=0)
	Button(root,text="Play!",command=run()).grid(row=2,column=0)
	Button(root,text="Load Save",command=menuc.load(root,True)).grid(row=4,column=0)
	Button(root,text="Options",command=menuc.options(root,True)).grid(row=5,column=0)
	Button(root,text="Credits",command=menuc.credits(root,True)).grid(row=6,column=0)
	Button(root,text="Visit us on Github!",command=webbrowser.open("http://github.com/RGTN",new=1,autoraise=True)).grid(row=7,column=0)
	Button(root,text="Quit",command=main.exit()).grid(row=8,column=0)
	root.mainloop()
Exemple #2
0
from main import exit, create_app
rds = redis_connection
from sockets import decode_token
from models import Account, Admin
import traceback
from settings import active_config, live_config

app = create_app(schedule_events=False)
app.app_context().push()
client = app.test_client()
config = active_config()

if __name__ == '__main__':
    customer = sys.argv[1] if len(sys.argv) > 1 else 'weppa'
    print '-'*20, '\nCUSTOMER: {}\n'.format(customer), '-'*20
    switch_customer(customer) or exit()

    print '>> creating admin account....'
    try:
        admin = Admin.objects(email='*****@*****.**').first()
        if not admin:
            admin = Admin()
            admin.enabled = True
            admin.first_name = 'Luke'
            admin.last_name = 'Zhao'
            admin.last_name_norm = 'Zhao'
            admin.locale = 'en-us'
            admin.password = Account.generate_password('AdmiN')
            admin.email = '*****@*****.**'
            admin.role = 'system'
            admin.save()
Exemple #3
0
 def on_cancel(self):
     main.exit()