以下所有操作均针对python命令行shell 操作步骤 1.控制shell窗口大小 import os os.popen('mode con cols=50 lines=20') 2.清屏 import os os.system('cls')