Changing Fonts in IDLE-0.5
jsteve17 at tampabay.rr.com
Wed Feb 14 19:20:54 CET 2001
Martin Franklin wrote:
> With idle 0.5 you should take a look around line 141 in
> change this.....
> if sys.platform[:3] == 'win':
> text['font'] = ("lucida console", 8)
> to just this.....
> text['font'] = ("Courier ", 24)
> 24 may be a little too big but you get the idea.
> You should consider upgrading to python 2.0 and idle 0.6
Well, this seems to be trying to work, except that I think that the syntax for
selecting the font must be off. Here is the error
I get after commenting out the "if sys.platform...." statement:
Traceback (innermost last):
File "./idle.py", line 2, in ?
File "./PyShell.py", line 15, in ?
from EditorWindow import EditorWindow, fixwordbreaks
File "./EditorWindow.py", line 142
text['font'] = ("times adobe", 14)
SyntaxError: invalid syntax
Maybe I should try Python 2.0.
> Dan Parisien wrote:
> > Jeff Stephens wrote:
> > > Already did. The only entries for font are in EditorWindow.py and
> > > EditorWindow.pyc. The latter file can't be viewed in
> > > an editor. I suspect it's some sort of compiled version of the .py
> > > file.
> > >
> > Yep. It's the byte-compiled python source (it's faster for python to load).
> > A mad-hack you could pull is changing line 152:
> > text['font'] = edconf.get('font-name'), edconf.get('font-size')
> > with
> > text['font'] = "courier", "12"
> > I hope it works :)
> > Dan
> > --
> > http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list