'Read the table column definitions from the ASCII file output by
BinTableHDU.dump().'

@classmethod
def _load_coldefs(cls, fileobj):

    close_file = False
    if isinstance(fileobj, string_types):
        fileobj = open(fileobj, 'r')
        close_file = True
    columns = []
    for line in fileobj:
        words = line[:(-1)].split()
        kwargs = {}
        for key in ['name', 'format', 'disp', 'unit', 'dim']:
            kwargs[key] = words.pop(0).replace('""', '')
        for key in ['null', 'bscale', 'bzero']:
            word = words.pop(0).replace('""', '')
            if word:
                word = _str_to_num(word)
            kwargs[key] = word
        columns.append(Column(**kwargs))
    if close_file:
        fileobj.close()
    return ColDefs(columns)
