We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
info
In situations where the output doesn't support ANSI escape codes the info output is garbled (the same is true for diff).
diff
FWIW rich doesn't have this issue. Checking sys.stdout.isatty might also be sufficient.
sys.stdout.isatty
If the following is in a script info.py:
info.py
import asdf import numpy as np tree = { "a": { "b": 1, "c": [1, 2, 3, 4, 5], }, "arr": np.arange(42), } af = asdf.AsdfFile(tree) af.info()
Running python info.py | less results in garbled output in less:
python info.py | less
less
ESC[1mrootESC[0m (AsdfObject) ESC[2m├─ESC[0mESC[1maESC[0m (dict) ESC[2m│ ├─ESC[0mESC[1mbESC[0m (int): 1 ESC[2m│ └─ESC[0mESC[1mcESC[0m (list) ESC[2m│ ├─ESC[0m[ESC[1m0ESC[0m] (int): 1 ESC[2m│ ├─ESC[0m[ESC[1m1ESC[0m] (int): 2 ESC[2m│ ├─ESC[0m[ESC[1m2ESC[0m] (int): 3 ESC[2m│ ├─ESC[0m[ESC[1m3ESC[0m] (int): 4 ESC[2m│ └─ESC[0m[ESC[1m4ESC[0m] (int): 5 ESC[2m└─ESC[0mESC[1marrESC[0m (ndarray): shape=(42,), dtype=int64
asdf version: main python version: 3.12 operating system: mac osx
The text was updated successfully, but these errors were encountered:
Converter.to_info
search
No branches or pull requests
Description of the problem
In situations where the output doesn't support ANSI escape codes the
info
output is garbled (the same is true fordiff
).FWIW rich doesn't have this issue. Checking
sys.stdout.isatty
might also be sufficient.Example of the problem
If the following is in a script
info.py
:Running
python info.py | less
results in garbled output inless
:System information
asdf version: main
python version: 3.12
operating system: mac osx
The text was updated successfully, but these errors were encountered: