Пример #1
0
def file_from_data(value, file_name: str, sheet_index: int) -> None:
    '''creates an output file using the given name'''
    data, function = value
    if function in ['newc', 'dtree']:
        return
    excel.file_setup(data, file_name, sheet_index)
    return
Пример #2
0
def file_from_data(value, file_name: str, sheet_index: int)->None:
    '''creates an output file using the given name'''
    data, function = value
    if function in ['newc','polys','mindep','dtree']:
        return
    excel.file_setup(data, file_name, sheet_index)
    return
Пример #3
0
def handle_results(results)->None:
    '''Outputs the data as a file of specified name and type'''
    print("""Warning: for the moment this program cannot append to files,
only create and overwrite them, please be careful about using existing files
You can specify a different sheet name to use if you wish to add to a file

Also, please choose a file type of .xlsx (.xls is not currently supported)
and be sure that the file is not open in another window.
          """)
    while True:
        file_name = input("Please enter the name of the file you would to create, including the extension: ")
        print("\n{}\n".format(file_name))
        sure = input("Are you sure this is the file name you wish to use (y/n)").strip().lower()
        if sure not in ['y', 'yes']:
            continue
        if file_name.split('.')[1] != 'xlsx':
            print("This file type is not currently supported")
            continue
        sheet_name = input("Please enter a sheet name: ").strip()
        break
    excel.file_setup([results,'bssa'], file_name, sheet_name)
    print("\n{}\n".format('*'*80))
    print("Results have been saved!")
    return
Пример #4
0
def file_from_data(value, file_name: str, sheet_index: int)->None:
    '''creates an output file using the given name'''
    excel.file_setup(value, file_name, sheet_index)
    return