[Tkinter-discuss] python 3.1 - tkinter 8.4 - no tile?

Guido Carballo-Guerrero charras at me.com
Sat Aug 28 15:42:48 CEST 2010



Monte, do you have python 3.1 or 2.6.5. I had a mac as well, and when I try to use ttk didn't work. They way I solve was to copy the ttk.py file inside of the site-packages, which in my case is inside of:

Library/Frameworks/Python.framewors/Versions/2.7/lib/python2.7/site-packages

Than, what I will recommend is to install from the source, not the installer disk image. If you install from the installer disk image, once you try to use ttk, you will see that the Tk and Tcl connected to ttk are version 8.4, which will not work.

If you need details instructions on how to install from the source let me know.

I hope this helps. Regards!

Guido Carballo


On Aug 28, 2010, at 4:00 AM, tkinter-discuss-request at python.org wrote:

> Send Tkinter-discuss mailing list submissions to
> 	tkinter-discuss at python.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://mail.python.org/mailman/listinfo/tkinter-discuss
> or, via email, send a message with subject or body 'help' to
> 	tkinter-discuss-request at python.org
> 
> You can reach the person managing the list at
> 	tkinter-discuss-owner at python.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tkinter-discuss digest..."
> Today's Topics:
> 
>   1. Re: python 3.1 - tkinter 8.4 - no tile? (Kevin Walzer)
>   2. Re: python 3.1 - tkinter 8.4 - no tile? (Monte Milanuk)
>   3. Re: Canvas.postscript() fails to render some fonts properly
>      (Michael Lange)
> 
> From: Kevin Walzer <kw at codebykevin.com>
> Date: August 27, 2010 5:40:27 AM GMT-06:00
> To: tkinter-discuss at python.org
> Subject: Re: [Tkinter-discuss] python 3.1 - tkinter 8.4 - no tile?
> Reply-To: kw at codebykevin.com
> 
> 
> On 8/27/10 12:15 AM, Monte Milanuk wrote:
> 
>> 
>> Hello Kevin,
>> 
>> I downloaded the python ttk wrapper and ran the command as you
>> suggested... but I'm not having any luck importing ttk (Mac OS X 10.6.4,
>> running the supplied python 2.6.5).
> 
> What error messages do you see?
> 
> -- 
> Kevin Walzer
> Code by Kevin
> http://www.codebykevin.com
> 
> 
> 
> 
> From: Monte Milanuk <memilanuk at gmail.com>
> Date: August 27, 2010 10:15:07 AM GMT-06:00
> To: tkinter-discuss at python.org
> Subject: Re: [Tkinter-discuss] python 3.1 - tkinter 8.4 - no tile?
> 
> 
> On 8/27/10 4:40 AM, Kevin Walzer wrote:
> 
>> What error messages do you see?
>> 
> 
> IDLE 2.6.5
> >>> from Tkinter import *
> >>> from Tkinter import ttk
> 
> Traceback (most recent call last):
>  File "<pyshell#1>", line 1, in <module>
>    from Tkinter import ttk
> ImportError: cannot import name ttk
> >>>
> 
> or
> 
> >>> import ttk
> 
> Traceback (most recent call last):
>  File "<pyshell#3>", line 1, in <module>
>    import ttk
> ImportError: No module named ttk
> 
> 
> If there is a different syntax I should be using, please let me know.
> 
> Thanks,
> 
> Monte
> 
> 
> 
> 
> 
> From: Michael Lange <klappnase at web.de>
> Date: August 27, 2010 11:33:00 AM GMT-06:00
> To: tkinter-discuss at python.org
> Subject: Re: [Tkinter-discuss] Canvas.postscript() fails to render some fonts properly
> 
> 
> Hello all,
> 
> I did now some further investigation on this topic and I thought I
> might share what I found here, for the archives :)
> 
> It seems that in fact the problem is the name of the postscript font
> created by Tk. Tk itself treats all font names case insensitive, so
> "cOMiC SanS mS" is equivalent with "comic sans ms". Postscript however
> appears to be quite fastidious about the spelling of a font name. Even
> worse, it looks like the requested spelling of a font can differ from one
> postscript interpreter to another.
> Tk itself creates postscript font names always the same way: the first
> letter capitalized, the rest lower case, as in "Courier". If the name
> contains white space, each "word" is capitalized and the white space
> removed, so e.g. "comic sans ms" becomes "ComicSansMs". This behavior is
> hard coded in tkFont.c . In my example the postscript interpreter insists
> on "ComicSansMS" though and therefore fails to print the font correctly.
> This is where the fontmap option comes in, passing the exact postscript
> font name to the fontmap like:
> 
>   set fontMap($fonty) {"ComicSansMS" 16}
>   .c postscript -file "~/test.ps" -fontmap fontMap
> 
> the "comic" font works as expected.
> However the bad thing is that this does not mean that it will work on any
> system, e.g. the same postscript file that works on my debian linux system
> did *not* work on my windows2000 box with a newly installed ghostscript
> (latest version).
> However if it is for personal use only, it seems to be better to directly
> add entries to the postscript fontmap (on unix systems usually
> /usr/share/ghostscript/<version>/lib/Fontmap )
> In my example this entry simply looks like:
> 
> /ComicSansMs			/ComicSansMS	;
> 
> or, probably better, add custom entries like this to a file MyFontmap in
> the same folder and add a line
> 
> (MyFontmap) .runlibfile
> 
> to Fontmap, so the private entries won't be lost after an update.
> 
> Michael
> 
> 
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
> 
> 	"Beauty is transitory."
> 	"Beauty survives."
> 		-- Spock and Kirk, "That Which Survives", stardate unknown
> 
> 
> 
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20100828/a1e90c83/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ttk.py
Type: text/x-python-script
Size: 56892 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20100828/a1e90c83/attachment-0001.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20100828/a1e90c83/attachment-0003.html>


More information about the Tkinter-discuss mailing list