def from_file_object(fobj, extension='',
                         table_name=None, table_index=None):
        """Load table from file object, you must specify a table's name
           or position number. If you don't know these, try from_messy."""
        # NOTE this is a messytables table name
        if (table_name is not None and table_index is not None) or \
                (table_name is None and table_index is None):
            raise TypeError("Must give exactly one of table_name, table_index")

        table_set = messytables.any.any_tableset(fobj, extension=extension)

        if table_name is not None:
            return Table.from_messy(table_set[table_name])
        elif table_index is not None:
            return Table.from_messy(table_set.tables[table_index])