From: Diane Trout Date: Wed, 25 Jan 2012 19:42:08 +0000 (-0800) Subject: split a function into two. (A query execute function and a reporting fuction) X-Git-Tag: v0.5.5~70 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=6d12017d244ee8412dba3c09658d1af706da6230 split a function into two. (A query execute function and a reporting fuction) --- diff --git a/htsworkflow/util/rdfhelp.py b/htsworkflow/util/rdfhelp.py index 3b2bfe0..3dd199f 100644 --- a/htsworkflow/util/rdfhelp.py +++ b/htsworkflow/util/rdfhelp.py @@ -33,6 +33,9 @@ def sparql_query(model, query_filename): query_body = open(query_filename,'r').read() query = RDF.SPARQLQuery(query_body) results = query.execute(model) + display_query_results(results) + +def display_query_results(results): for row in results: output = [] for k,v in row.items()[::-1]: