Better printing of MOs in API
This commit is contained in:
parent
b63405592f
commit
49a09fd52c
@ -16,6 +16,11 @@ def _txt(mo_tree):
|
||||
""" txt render for MOs or Trees"""
|
||||
try:
|
||||
return tree2txt(mo_tree)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
return mo_tree.__txt__
|
||||
except AttributeError:
|
||||
return str(mo_tree)
|
||||
|
||||
@ -23,6 +28,11 @@ def _tex(mo_tree):
|
||||
""" Tex render for MOs or Trees"""
|
||||
try:
|
||||
return tree2tex(mo_tree)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
return mo_tree.__tex__
|
||||
except AttributeError:
|
||||
return str(mo_tree)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user