deprecating output to stdout

pull/1/head
Ozbolt Menegatti 5 years ago
parent b819d9953f
commit 68c22d4e27

@ -1320,9 +1320,7 @@ class Writer:
fp_.close() fp_.close()
def fp_open(snum=None): def fp_open(snum=None):
if self.output_file is None: if snum is None:
return sys.stdout
elif snum is None:
return open(self.output_file, "w") return open(self.output_file, "w")
else: else:
return open("{}.{}".format(self.output_file, snum), "w") return open("{}.{}".format(self.output_file, snum), "w")
@ -1521,7 +1519,7 @@ if __name__ == '__main__':
parser.add_argument('input', parser.add_argument('input',
help='input xml file in `ssj500k form`, can list more than one', nargs='+') help='input xml file in `ssj500k form`, can list more than one', nargs='+')
parser.add_argument('--out', parser.add_argument('--out',
help='Output file (if none given, then output to stdout)') help='Classic output file')
parser.add_argument('--out-no-stat', parser.add_argument('--out-no-stat',
help='Output file, but without statistical columns') help='Output file, but without statistical columns')
parser.add_argument('--all', parser.add_argument('--all',

Loading…
Cancel
Save