Exemplo n.º 1
0
def export_to_file_using_string_set(filter_name,user_id_set):

    #write to file
    data_file_full_path=default_filter_path+filter_name+'.dat'
    helper_file.write_big_string_set_to_file(data_file_full_path,user_id_set)

    #generate code    

    content=(filter_tpl_using_string_set % (repr(data_file_full_path),len(user_id_set)))
    code_file_full_path=default_filter_path+filter_name+'.py'
    helper_file.export_to_file(code_file_full_path,content)
Exemplo n.º 2
0
def export_to_file(filter_name,user_id_dict):
    
    id_string=repr(user_id_dict)
    content=(filter_tpl % (id_string,len(user_id_dict)))
    file_full_path=default_filter_path+filter_name+'.py'
    helper_file.export_to_file(file_full_path,content)