#NEWLINE# def run_query( query , query_params , lang ) : #NEWLINE# #INDENT# db_title = ( query + 'wiki_p' ) #NEWLINE# db_host = ( lang + 'wiki.labsdb' ) #NEWLINE# connection = oursql . connect ( db = db_title , host = db_host , read_default_file = DB_CONFIG_PATH , charset = None ) #NEWLINE# cursor = connection . cursor ( oursql . DictCursor ) #NEWLINE# cursor . execute ( query , query_params ) #NEWLINE# ret = cursor . fetchall ( ) #NEWLINE# return ret