def update_frame(frame): display.sendCmd('Frame {0}'.format(frame)) display.setCurPos(2, 1) display.sendCmd(get_space()) display.setCurPos(1, 1) with open(FRAME_FILE, 'w') as f: f.write(str(frame))
def hello(): frame = get_frame() data = { 'frame': frame, 'image': FILENAME_FORMAT.format(frame=frame), 'IMAGES_URL': '/m/', 'space': get_space(), 'INTERVAL': INTERVAL } return render_template('base.html', data=data)