Open GalacticStarfish opened 6 years ago
The tree.show method has alot of options:
tree.show
tree.show([nid[, level[, idhidden[, filter[, key[, reverse[, line_type[, data_property]]]]]]]]]
However, none of these parameters is an iostream.
Also, tree.save2file accepts a filename, but not a filestream. Meaning we cannot redirect the output to a stream other than a file.
tree.save2file
Below is the full signature for , tree.save2file
tree.save2file(filename[, nid[, level[, idhidden[, filter[, key[, reverse]]]]]]])
It would be nice to be able to send a print-out of the tree to any stream we desire. For example,
import io with io.StringIO("") as str_strm: t.show(strem = str_strm)
import sys t.show(strm = sys.stderr)
I would think that there would be an optional iostream parameter to Tree.show and/or Tree.save2file with its default value being sys.stdout
Tree.show
Tree.save2file
sys.stdout
The
tree.show
method has alot of options:However, none of these parameters is an iostream.
Also,
tree.save2file
accepts a filename, but not a filestream. Meaning we cannot redirect the output to a stream other than a file.Below is the full signature for ,
tree.save2file
It would be nice to be able to send a print-out of the tree to any stream we desire. For example,
import io with io.StringIO("") as str_strm: t.show(strem = str_strm)
import sys t.show(strm = sys.stderr)
I would think that there would be an optional iostream parameter to
Tree.show
and/orTree.save2file
with its default value beingsys.stdout