For reference, the json library has json.tool to handle input streams. You can run it on a shell prompt to pretty print json
curl http://something.json | python -m json.tool
Wondering if there's anything useful bitmath could do like this?
$ python -m bitmath.best 1024
KiB(1)
^ this would actually simplify my own personal frequent use case where I get a number in bytes printed in one shell,and I can't quite tell how big it is. Usually I'll just open another shell, import bitmath and then print out Byte(some_number).best_prefix().
For reference, the json library has
json.toolto handle input streams. You can run it on a shell prompt to pretty print jsonWondering if there's anything useful bitmath could do like this?
^ this would actually simplify my own personal frequent use case where I get a number in bytes printed in one shell,and I can't quite tell how big it is. Usually I'll just open another shell, import bitmath and then print out
Byte(some_number).best_prefix().