Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree.show(), print bytes at stdout #229

Closed
kiraskyler opened this issue Jun 28, 2024 · 1 comment
Closed

tree.show(), print bytes at stdout #229

kiraskyler opened this issue Jun 28, 2024 · 1 comment

Comments

@kiraskyler
Copy link
Contributor

here is Example at https://treelib.readthedocs.io/en/latest/

>>> from treelib import Node, Tree
>>> tree = Tree()
>>> tree.create_node("Harry", "harry")  # root node
>>> tree.create_node("Jane", "jane", parent="harry")
>>> tree.create_node("Bill", "bill", parent="harry")
>>> tree.create_node("Diane", "diane", parent="jane")
>>> tree.create_node("Mary", "mary", parent="diane")
>>> tree.create_node("Mark", "mark", parent="jane")
>>> tree.show()
Harry
├── Bill
└── Jane
    ├── Diane
    │   └── Mary
    └── Mark

but:

# python3 simple.py
b'Harry\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 Bill\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 Jane\n    \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 Diane\n    \xe2\x94\x82   \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 Mary\n    \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 Mark\n'

😥

@kiraskyler
Copy link
Contributor Author

pr: pull/23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant