diff --git a/src/omero_rdf/__init__.py b/src/omero_rdf/__init__.py index a788716..f855b00 100644 --- a/src/omero_rdf/__init__.py +++ b/src/omero_rdf/__init__.py @@ -223,7 +223,8 @@ def emit(self, triple: Triple): else: # Streaming s, p, o = triple - print(f"""{s.n3()}\t{p.n3()}\t{o.n3()} .""") + escaped = o.n3().encode("unicode_escape").decode("utf-8") + print(f"""{s.n3()}\t{p.n3()}\t{escaped} .""") def close(self): if self.pretty_print: @@ -376,7 +377,7 @@ def descend( """ if isinstance(target, list): - return([self.descend(gateway, t, handler) for t in target]) + return [self.descend(gateway, t, handler) for t in target] elif isinstance(target, Screen): scr = self._lookup(gateway, "Screen", target.id)