@classmethod
def from_fixed(cls, path, schema_path, column_names=utils.default, column_types=None, row_names=None, encoding='utf-8', schema_encoding='utf-8'):
    from agate.table import Table

    close_f = False

    if not hasattr(path, 'read'):
        f = io.open(path, encoding=encoding)
        close_f = True
    else:
        f = path

    close_schema_f = False

    if not hasattr(schema_path, 'read'):
        schema_f = io.open(schema_path, encoding=schema_encoding)
        close_schema_f = True
    else:
        schema_f = path

    reader = fixed.reader(f, schema_f)
    rows = list(reader)

    if close_f:
        f.close()

    if close_schema_f:
        schema_f.close()

    if column_names == utils.default:
        column_names = reader.fieldnames

    return Table(rows, column_names, column_types, row_names=row_names)
Create a new table from a fixed-width file and a CSV schema.
dataset/ETHPy150Open wireservice/agate/agate/table/from_fixed.py/from_fixed