def load_palette_data(paletteID='default'): ''' Returns palette data file. Data is a dictionary of palettes, currently containing only a default plaette. Palette data is not stored. ''' filename = 'palette' _data = file_handler.load_pickle(filename) palette_data = _data[paletteID] return palette_data
def get_data_file(data_filename): ''' Returns data file of specified name from __data_file_dict. If the data can not be found, it is loaded from file and stored in __data_file_dict for future reuse. Parameter: data_filename str filename (of existing .pkl data file) ''' if not __data_file_dict.has_key(data_filename): __data_file_dict[data_filename] = file_handler.load_pickle(data_filename) return __data_file_dict[data_filename]