我正在用 Python 编写一个程序,我希望它显示的数据必须能够同时显示在屏幕上,而无需四处滚动。默认的命令行大小不允许这样做。
有什么方法可以在不创建 GUI 的情况下自动调整 Python 命令行窗口的大小?该程序将仅在 Windows 上使用。
最佳答案
#!/usr/bin/env python3
import os
os.system('mode con: cols=100 lines=40')
input("Press any key to continue...")
关于python - 自动调整命令行窗口大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9458870/