Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75928

Re: how to print with given font and size?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.050
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'cc:addr:python-list': 0.11; 'python': 0.11; 'gui': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'personally,': 0.16; 'pygtk,': 0.16; 'pyqt,': 0.16; 'simple.': 0.16; 'wrote:': 0.18; 'work,': 0.20; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'text.': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'font': 0.31; 'really,': 0.31; 'subject:size': 0.31; 'probably': 0.32; 'regular': 0.32; 'quite': 0.32; 'actual': 0.34; 'subject:with': 0.35; 'basic': 0.35; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'subject:?': 0.36; 'should': 0.36; 'starting': 0.37; 'others.': 0.38; 'how': 0.40; 'new': 0.61; 'world.': 0.61; 'kind': 0.63; 'pick': 0.64; 'console,': 0.84; 'fonts': 0.84; 'graphical': 0.91; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=t/lchgMe4W9i+UAUFT7CGI9P6/iY5Z47oOF+UupFwro=; b=WgMTzKxp2chNHSSVpBHpG7WhdzLEa3nY6YV9WRYwM0LbNhYlkeOkH+DdhbqTZHaRpa qJwunHG4WJqJHD36E1nIwQW8N7EQjIDidvup+n5YS0ggzPEJSlvYKi1QJQlkzY4dWS2K 6C4zFZ5UFWIZrVOeJmQYKJ4tamchfSaxrGshgYuPMpqIGbiwm/s5ky381O9JlIZBaTZJ y+NogbpDwl8LT9ntRnPLyMeOfSNkSNHeEskRNIZMVnkzY/LdpjkTnyS38+g9ZKbjA3nP QjhtvGSLDDoZTBZb/oJA2DGXEKfyOtsRJcYQzXLuBQ1+VFEKuOtyTLK4b/MRNTQclHmn hsqA==
MIME-Version 1.0
X-Received by 10.43.69.202 with SMTP id yd10mr16340921icb.36.1407552652899; Fri, 08 Aug 2014 19:50:52 -0700 (PDT)
In-Reply-To <53E65B7F.9060600@gmail.com>
References <53E65B7F.9060600@gmail.com>
Date Sat, 9 Aug 2014 12:50:52 +1000
Subject Re: how to print with given font and size?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12782.1407552657.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1407552657 news.xs4all.nl 2836 [2001:888:2000:d::a6]:35671
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75928

Show key headers only | View raw


On Sun, Aug 10, 2014 at 3:33 AM, luofeiyu <elearn2014@gmail.com> wrote:
> print("hallo") is so simple.
>
> how can  print word "hallo"  in console with courier New font  16 pound?

You'd have to look to your console's settings; generally, you can't
change fonts. For that kind of work, what you want is an actual GUI;
there are a number of good Python GUI toolkits, including PyGTK,
Tkinter, wxPython, PyQt, and others. Pick one (Tkinter's probably a
good choice for starting out, as it comes with Python on several
platforms; personally, I quite like GTK; but really, any will do), and
work through its tutorial, which should take you through a basic
graphical Hello, World. But at a regular console, you don't have fonts
- all you have is a stream of text.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: how to print with given font and size? Chris Angelico <rosuav@gmail.com> - 2014-08-09 12:50 +1000

csiph-web