@ilwdchar_compat<EOL>def list_tables(source):<EOL>
<EOL>rom ligo.lw.ligolw import (Document, Stream)<EOL>t ImportError:  <EOL>rom glue.ligolw.ligolw import Document, Stream<EOL>d file object<EOL>instance(source, Document):<EOL>mldoc = source<EOL>ilt = get_filtering_contenthandler(Stream)<EOL>mldoc = read_ligolw(source, contenthandler=filt)<EOL><INDENT>list of table names<EOL><DEDENT>s = []<EOL>bl in xmldoc.childNodes[<NUM_LIT:0>].childNodes:<EOL>ry:<EOL><INDENT>tables.append(tbl.TableName(tbl.Name))<EOL><DEDENT>xcept AttributeError:  <EOL><INDENT>continue<EOL><DEDENT>n tables<EOL>
List the names of all tables in this file(s)

    Parameters
    ----------
    source : `file`, `str`, :class:`~ligo.lw.ligolw.Document`, `list`
        one or more open files, file paths, or LIGO_LW `Document`s

    Examples
    --------
    >>> from gwpy.io.ligolw import list_tables
    >>> print(list_tables('H1-LDAS_STRAIN-968654552-10.xml.gz'))
    ['process', 'process_params', 'sngl_burst', 'search_summary', 'segment_definer', 'segment_summary', 'segment']