Skip to content
Snippets Groups Projects
Commit 803d5ea4 authored by Christoph.Knote's avatar Christoph.Knote
Browse files

Write method for output files added.

parent 53b28039
No related branches found
No related tags found
No related merge requests found
......@@ -268,6 +268,15 @@ class Output(object):
os.remove(self.fpath)
except Exception as e:
raise("Removing output file did not work: {:s}".format(str(e)))
def write(self, f=sys.stdout):
'''
Write contents of Output into file
:param File f: file object or stream where to write to, defaults to sysout.
'''
with open(self.fpath, 'rb') as i:
for line in i:
f.write(i)
def copy(self, target_path):
'''
Copy output file to target_path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment