treelib 모듈 설치
pip install treelib
from treelib import Node, Tree
tree = Tree()
tree.create_node("Server", "Server")
tree.create_node("A_Server", "A_Server", parent="Server")
tree.create_node("script.py", "script_A.py", parent="A_Server")
tree.create_node("print('hello world')", "line_A_1", parent="script_A.py")
tree.create_node("B_Server", "B_Server", parent="Server")
tree.create_node("script.py", "script_B.py", parent="B_Server")
tree.create_node("print('hello python')", "line_B_1", parent="script_B.py")
tree.show()
'Python > Python Programming' 카테고리의 다른 글
[ Python ] xml 타입의 데이터 json 으로 변경 (0) | 2023.04.24 |
---|---|
[ Python ] difflib 모듈 ( 문자열 비교, 유사도 ) (0) | 2023.04.24 |
[ Python ] elastcisearch index 생성, 삭제, 조회 (0) | 2023.04.14 |
[ Python ] Remine API 사용하기 (0) | 2023.03.21 |
[ Python ] eval과 literal_eval 차이 (0) | 2022.07.03 |
[ Python ] cx_Oracle을 이용한 oracle 연결 (0) | 2022.06.27 |
[Python] 줄 바꿈(\n) 을 포함 입력 (0) | 2020.11.28 |
[Python] Celsius temperature To Fahrenheit's temperature Basic Function (섭씨, 화씨) (0) | 2020.11.22 |