Change console font in Windows

后端 未结 7 1160
闹比i
闹比i 2020-11-30 12:04

Is there a way to change the console font in Windows in python 2.6?

I\'m on Windows 7.

ie:

import os
os.console.font = \'Lucida Console\'
         


        
7条回答
  •  鱼传尺愫
    2020-11-30 12:36

    Probably not. In Windows console font is the property of and managed by the cmd.exe program.

    As with everything, it's possible that if you reverse engineer how cmd.exe works, where it stores information about the font, how to force it to reload it etc. you might be able to do hack it (in any language) but there is no functionality provided by the system in a supported and documented way on how to do it.

提交回复
热议问题