def read_file(self, file_path): f = open(file_path, 'r') try: session_data = f.read() finally: f.close() self.ui._thaw(json.read(session_data))
def ImageDetailsSync(self, state): """ Signals end of image and shares the rest of the needed data to create the image remotely.""" state = json.read(str(state)) state['game']['board']['cutboard']['pb'] = zlib.decompress( self.image.getvalue()) self.activity.ui._thaw(state) self.activity.ui._send_status_update()
def read_file(self, file_path): f = open(file_path, 'r') try: session_data = f.read() finally: f.close() #logging.debug('Trying to set session: %s.' % session_data) logging.debug("Setting session") self.ui._thaw(json.read(session_data))
def read_file(self, file_path): f = open(file_path, 'r') try: session_data = f.read() finally: f.close() #logging.debug('Trying to set session: %s.' % session_data) logging.debug("Setting session") self.ui._thaw(json.read(session_data)) logging.debug("Done setting session")
def apply(self): """ Apply the saved state to the running game """ self.slider_ui._thaw(json.read(self.frozen))
def apply (self): """ Apply the saved state to the running game """ self.slider_ui._thaw(json.read(self.frozen))
def ImageDetailsSync (self, state): """ Signals end of image and shares the rest of the needed data to create the image remotely.""" state = json.read(str(state)) state['game']['board']['cutboard']['pb'] = zlib.decompress(self.image.getvalue()) self.activity.ui._thaw(state) self.activity.ui._send_status_update()