def GET(self): qdict = web.input() print 'qdict: ', qdict if qdict['btnId'] =="upd": for f in installed: if f in qdict: command = 'chmod g+x plugins/'+f subprocess.call(command.split()) else: command = 'chmod g-x plugins/'+f subprocess.call(command.split()) restart(1, True) if qdict['btnId'] =="del": del_list = [] for k in qdict.keys(): # Get plugins to delete if k[:3] == "del": del_list.append(k[4:]) for p in del_list: # get files to delete for each plugin in list name = p.split('.')[0] desc, files = parse_manifest(name) for f in files: victim = f.split() if victim[0][-3:] == ".py": b_code = victim[0].replace('.py', '.pyc') command = 'rm -f '+victim[1]+'/'+b_code subprocess.call(command.split()) command = 'rm -f '+victim[1]+'/'+victim[0] # print 'command: ', command subprocess.call(command.split()) restart(1, True) raise web.seeother('/')
def perform_update(): # ignore local chmod permission command = "git config core.filemode false" # http://superuser.com/questions/204757/git-chmod-problem-checkout-screws-exec-bit subprocess.call(command.split()) command = "git pull" output = subprocess.check_output(command.split()) print 'Update result:', output restart(3)
def perform_update(): # ignore local chmod permission command = "git config core.filemode false" # http://superuser.com/questions/204757/git-chmod-problem-checkout-screws-exec-bit subprocess.call(command.split()) #command = "git pull" command = "git fetch" subprocess.call(command.split()) command = "git reset –hard origin/master" output = subprocess.check_output(command.split()) print 'Update result:', output restart(3)
print(u"Creating plugins menu", e) pass tl = Thread(target=timing_loop) tl.daemon = True tl.start() if gv.use_gpio_pins: set_output() app.notfound = lambda: web.seeother(u"/") ########################### #### For HTTPS (SSL): #### if gv.sd["htp"] == 443: try: from cheroot.server import HTTPServer from cheroot.ssl.builtin import BuiltinSSLAdapter HTTPServer.ssl_adapter = BuiltinSSLAdapter( certificate='/usr/lib/ssl/certs/SIP.crt', private_key='/usr/lib/ssl/private/SIP.key' ) except IOError as e: gv.sd[u"htp"] = int(80) jsave(gv.sd, u"sd") print(u"SSL error", e) restart(2) app.run()
def GET(self): restart(2, True) return template_render.home()
if iter_count % 50 == 0: if speed != 5: speed -= 5 else: pass if iter % speed == 0: make_enemy(screen) #Keeping Track of count so that it doesnt litter the board coin_count = make_coins(screen, 38, coin_count) moveEnemy(screen) #The fall is implemented wvery 2 iterations if iter % 2 == 0: if player.retx() + 1 == 20: player = restart(screen, player) health -= 1 if health == 0: break #Enemy is killed if the player is supposeed to fall on him if killEnemy(screen, player): enemy_kill += 1 if eat_coins(screen, player): play(coin) count += 1 coin_count -= 1 if killPlayer(screen, player): player = restart(screen, player) health -= 1
def GET(self): restart(3) return template_render.restarting('/UPs')