scripts/export/rfam_xml_dumper.py
def fetch_value_list(rfam_acc, query):
    """
    Retrieves and returns a list of all rfam_acc related values, returned
    by executing the query. Values in list are converted to string format.
    If rfam_acc is None then query is executed without an rfam_acc

    rfam_acc:   A family specific accession
    query:  A string with the MySQL query to be executed
    """

    cnx = RfamDB.connect()

    cursor = cnx.cursor(raw=True)

    if rfam_acc is None:
        cursor.execute(query)
    else:
        cursor.execute(query % rfam_acc)

    values = cursor.fetchall()

    cursor.close()
    cnx.disconnect()

    if len(values) > 0:
        if isinstance(values[0], tuple):
            return [str(x[0]) for x in values]
        else:
            return [str(x) for x in values]

    return []

    Retrieves and returns a list of all rfam_acc related values, returned
    by executing the query. Values in list are converted to string format.
    If rfam_acc is None then query is executed without an rfam_acc

    rfam_acc:   A family specific accession
    query:  A string with the MySQL query to be executed
    
Retrieves and returns a list of all rfam_acc related values, returned
by executing the query. Values in list are converted to string format.
If rfam_acc is None then query is executed without an rfam_acc

A family specific accession
query:  A string with the MySQL query to be executed
Retrieves and returns a list of all rfam_acc related values returned by executing the query . Values in list are converted to string format . If rfam_acc is None then query is executed without an rfam_acc A family specific accession query : A string with the MySQL query to be executed
def fetch_value_list(rfam_acc, query):
    cnx = RfamDB.connect()
    cursor = cnx.cursor(raw=True)
    if rfam_acc is None:
        cursor.execute(query)
    else:
        cursor.execute(query % rfam_acc)
    values = cursor.fetchall()
    cursor.close()
    cnx.disconnect()
    if len(values) > 0:
        if isinstance(values[0], tuple):
            return [str(x[0]) for x in values]
        else:
            return [str(x) for x in values]
    return []
def fetch_value_list ( rfam_acc , query ) : cnx = RfamDB . connect ( ) cursor = cnx . cursor ( raw = True ) if rfam_acc is None : cursor . execute ( query ) else : cursor . execute ( query % rfam_acc ) values = cursor . fetchall ( ) cursor . close ( ) cnx . disconnect ( ) if len ( values ) > 0 : if isinstance ( values [ 0 ] , tuple ) : return [ str ( x [ 0 ] ) for x in values ] else : return [ str ( x ) for x in values ] return [ ]
Retrieves and returns a list of all rfam_acc related values, returned
by executing the query.
Retrieves and returns a list of all rfam_acc related values returned by executing the query .
"""
    Retrieves and returns a list of all rfam_acc related values, returned
    by executing the query. Values in list are converted to string format.
    If rfam_acc is None then query is executed without an rfam_acc

    rfam_acc:   A family specific accession
    query:  A string with the MySQL query to be executed
    """
rfam_acc
query