def save_obj(obj, save_path):
 if ((save_path is None) or (len(save_path) == 0)):
  return
 save_path = os.path.expandvars(os.path.expanduser(save_path))
 logger.debug('serializing object to: %s', save_path)
 ensure_dirs_exist(save_path)
 pickle.dump(obj, open(save_path, 'wb'), 2)

def save_obj ( obj , save_path ) : if ( ( save_path is None ) or ( len ( save_path ) == 0 ) ) : return save_path = os . path . expandvars ( os . path . expanduser ( save_path ) ) logger . debug ( 'serializing object to: %s' , save_path ) ensure_dirs_exist ( save_path ) pickle . dump ( obj , open ( save_path , 'wb' ) , 2 )
dumps a python data structure to a saved on-disk representation .