def update(self, column, data): reader.select_file(self._fid) offset = self.get_offset(column) data_list = self._ordered_columns[column].format_to_card(data) if(reader.update_binary(offset, len(data_list), data_list)): print column," Updated" return True
def update(self, column, data): reader.select_file(self._fid) offset = self.get_offset(column) data_list = self._ordered_columns[column].format_to_card(data) if (reader.update_binary(offset, len(data_list), data_list)): print column, " Updated" return True
def read_bulk(self, engine=None): reader.select_file(self._fid) data = [] length_tmp = self._length offset_tmp = 0 if engine is not None: engine.init_progress() while length_tmp > 255: data += reader.read_binary(offset_tmp, 255) length_tmp -= 255 offset_tmp += 255 if engine is not None: # print "progress %", (float(offset_tmp)/self._length) engine.set_progress(float(offset_tmp) / self._length) data += reader.read_binary(offset_tmp, length_tmp) if engine is not None: engine.set_progress(1) data_bulk = {} for item in self._ordered_columns: item_offset = self.get_offset(item) item_length = self._ordered_columns[item].length data_item = data[(item_offset):(item_offset + item_length)] data_fmt = self._ordered_columns[item].format_to_terminal( data_item) data_bulk[item] = data_fmt if DEBUG: print "data formated = %s" % (str(data_bulk)) return data_bulk
def read_bulk(self, engine=None): reader.select_file(self._fid) data = [] length_tmp = self._length offset_tmp = 0 if engine is not None: engine.init_progress() while length_tmp > 255: data += reader.read_binary(offset_tmp, 255) length_tmp -= 255 offset_tmp += 255 if engine is not None: # print "progress %", (float(offset_tmp)/self._length) engine.set_progress(float(offset_tmp)/self._length) data += reader.read_binary(offset_tmp, length_tmp) if engine is not None: engine.set_progress(1) data_bulk = {} for item in self._ordered_columns: item_offset = self.get_offset(item) item_length = self._ordered_columns[item].length data_item = data[(item_offset):(item_offset+item_length)] data_fmt = self._ordered_columns[item].format_to_terminal(data_item) data_bulk[item] = data_fmt if DEBUG : print "data formated = %s" %(str(data_bulk)) return data_bulk
def read(self, column): reader.select_file(self._fid) offset = self.get_offset(column) length = self._ordered_columns[column].length data = reader.read_binary(offset, length) data_fmt = self._ordered_columns[column].format_to_terminal(data) print "DATA : ", str(data_fmt) return data_fmt
def read(self, column): reader.select_file(self._fid) offset = self.get_offset(column) length = self._ordered_columns[column].length data = reader.read_binary(offset, length) data_fmt = self._ordered_columns[column].format_to_terminal(data) print "DATA : ", str(data_fmt) return data_fmt
def install(self): reader.select_file(0x3f00) length = 0 for item in self._columns.values(): length += item.length print length if (reader.create_file(length, self._fid, 0x00, 0x00)): print "Install successfull" return True
def install(self): reader.select_file(0x3f00) length = 0 for item in self._columns.values(): length += item.length print length if(reader.create_file(length, self._fid, 0x00, 0x00)): print "Install successfull" return True
def install(self): reader.select_file(0x3f00) if (reader.create_file(self._length, self._fid, 0x00, 0x00)): if DEBUG: print "Installed : %s" % self._name return True
def install(self): reader.select_file(0x3f00) if (reader.create_file(self._length_total, self._fid, 0x00, 0x00)): if DEBUG: print "Install successfull" return True
def install(self): reader.select_file(0x3f00) if(reader.create_file(self._length, self._fid, 0x00, 0x00)): if DEBUG : print "Installed : %s" %self._name return True
def install(self): reader.select_file(0x3f00) if(reader.create_file(self._length_total, self._fid, 0x00, 0x00)): if DEBUG : print "Install successfull" return True