打印输出到屏幕时修改字体大小 [英] Modify font size when print out to screen

查看:432
本文介绍了打印输出到屏幕时修改字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Win XP和Python 2.5。在打印到CMD窗口时,Python是否有一种方法来修改字体大小?

I'm using Win XP and Python 2.5. Is there a way in Python to modify font size when print to CMD window?

推荐答案

可以使用 ctypes 可以访问必要的窗口调用来更改控制台的字体(包括字体大小)。有关代码示例,请参阅我对其他问题的回答。

You can use ctypes to access the necessary windows calls to change the font (including the size of the font) of the console. See my answer to another question for a code example.

这篇关于打印输出到屏幕时修改字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆