def create():
    global COLUMNS
    file_path = "{0}{1}".format(Config.csv_file_directory, Config.csv_file_name)
    if os.path.exists(file_path):
        os.remove(file_path)
    COLUMNS = column_file_loader.load()
    COLUMNS += '\n'
    write_columns()
    parse_counts()
示例#2
0
def create():
    global COLUMNS
    file_path = "{0}{1}".format(Config.csv_file_directory,
                                Config.csv_file_name)
    if os.path.exists(file_path):
        os.remove(file_path)
    COLUMNS = column_file_loader.load()
    COLUMNS += '\n'
    write_columns()
    parse_counts()
def update(column):
    global columns
    if not columns:
        columns = column_file_loader.load()
    if column not in columns:
        columns = "{0},{1}".format(columns, column)
        filePath = "{0}{1}".format(Config.temp_file_directory, Config.temp_column_file_name)
        f = open(filePath,'w')
        f.write(columns)
        f.close()
示例#4
0
def update(column):
    global columns
    if not columns:
        columns = column_file_loader.load()
    if column not in columns:
        columns = "{0},{1}".format(columns, column)
        filePath = "{0}{1}".format(Config.temp_file_directory,
                                   Config.temp_column_file_name)
        f = open(filePath, 'w')
        f.write(columns)
        f.close()