【发布时间】:2020-06-08 00:01:25
【问题描述】:
在 PyCharm 中,终端的最大宽度似乎为 265 个字符。
要查看此内容,请在 PyCharm 终端的 python 提示符下运行以下命令:
print('x' * 264) # displays a long row of xxxxxxx on one line
print('x' * 265) # wraps the newline character onto a new line
print('x' * 266) # wraps one of the x's onto a new line
PyCharm 中是否有设置来增加此线宽限制?
我想打印出比这更长的行,以便与不同程序的输出进行比较。
我意识到我可以从 Python 将输出写入文件,但为了快速调试,打印到终端通常很方便。
【问题讨论】:
-
这已经被问过了。您确定诸如How do I set the maximum line length in PyCharm? 之类的答案不起作用吗?
-
我在 stackoverflow 和 google 上都看过,但没有找到其他人问这个问题。您链接到的问题是关于在 editor 中设置线宽,而不是在 terminal 中。