[Tutor] Change Font Size when print to screen

tee chwee liong tcl76 at hotmail.com
Tue Jan 11 10:42:11 CET 2011


tim, you are right. i'm using Windows XP and Python 2.5.
 
thanks
tcl76
 
> Date: Tue, 11 Jan 2011 09:21:26 +0000
> From: mail at timgolden.me.uk
> CC: tutor at python.org
> Subject: Re: [Tutor] Change Font Size when print to screen
> 
> On 11/01/2011 09:03, tee chwee liong wrote:
> > When I do print "Hello World", it will print to the cmd window with
> > the standard font size. Is there a way we can increase the font size
> > to larger when print out to the cmd window?
> 
> I'm going to assume that you're using Windows, since you
> refer to the "cmd window". If you're on Linux or OS X the
> answer will be different.
> 
> In short, this isn't straightforward. The Python interpreter
> simply sends text to the console and the console renders it
> using whatever font and size have been selected by the user.
> 
> You can set the font & size of any console window (and save
> it as the default) by using the System Menu -- left-click at
> the top-left of the Window.
> 
> But if you want a particular Python script to have the power
> to write smaller or larger text on demand, you're going to
> need to control the console functions directly. You can do
> this via the win32console module of the pywin32 modules:
> 
> http://sourceforge.net/projects/pywin32/
> 
> or by rolling the same thing yourself from within Python via ctypes:
> 
> http://docs.python.org/library/ctypes.html
> 
> I'm not aware that you can have a mixture of smaller and larger
> (or different) fonts on one console window. AFAICT you can set
> the font/size for the whole console but nothing else. If you need
> more control, you're going to have to move to some kind of
> GUI solution.
> 
> TJG
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110111/b5fdead3/attachment-0001.html>


More information about the Tutor mailing list