自动调整命令行窗口的大小

Dan*_*Doe 7 python windows cmd resize

我正在用Python编写程序,我希望它显示的数据必须能够同时适应屏幕,而无需滚动.默认的命令行大小不允许这样做.

有没有办法在不创建GUI的情况下自动调整Python中的命令行窗口大小?该程序仅用于Windows.

Fah*_*şçi 18

import os

os.system('mode con: cols=100 lines=40')
raw_input("Press any key to continue...")
Run Code Online (Sandbox Code Playgroud)