【发布时间】:2019-01-20 12:45:40
【问题描述】:
我在 Windows 上使用 Git Bash,尝试使用命令行漂亮地打印 JSON 输出。按照this 的回答,我尝试以下操作:
$ echo '{"print": "this"}' | python -m json.tool
stdin is not a tty
我的 Python 版本是 2.7.15 (Anaconda)。
当我使用本机 Windows cmd 尝试相同的操作时,它可以正常工作(但我想使用 Bash)。
【问题讨论】:
标签: windows python-2.7 git-bash tty