projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
630705a
)
Change rdfhelp.dump_model so you can specify a destination stream.
author
Diane Trout
<diane@caltech.edu>
Tue, 18 Sep 2012 18:31:49 +0000
(11:31 -0700)
committer
Diane Trout
<diane@caltech.edu>
Tue, 18 Sep 2012 18:31:49 +0000
(11:31 -0700)
htsworkflow/util/rdfhelp.py
patch
|
blob
|
history
diff --git
a/htsworkflow/util/rdfhelp.py
b/htsworkflow/util/rdfhelp.py
index fda8772f858601a0f488c61248da3d39d67c7be3..cb445b6b0cb4f5f1d9abab3d13ae7edad483b931 100644
(file)
--- a/
htsworkflow/util/rdfhelp.py
+++ b/
htsworkflow/util/rdfhelp.py
@@
-418,6
+418,9
@@
def get_serializer(name='turtle'):
return writer
-def dump_model(model):
+def dump_model(model, destination=None):
+ if destination is None:
+ destination = sys.stdout
serializer = get_serializer()
- print serializer.serialize_model_to_string(model)
+ destination.write(serializer.serialize_model_to_string(model))
+ destination.write(os.linesep)