On 3/2/2012 8:48 PM, John Salerno wrote:
According to the Python docs, the way to use tkinter.ttk is this:

from tkinter import *
from tkinter.ttk import *

I suppose the 'advantage' of this is that it will replace tk widgets with equivalent ttk widgets, if they exist and have the same name. I believe one has to program them differently, however, so the replacement cannot be transparent and one mush know anyway what gets replaced and what not.

But what if I don't like this import method and prefer to do:

import tkinter as tk

How then do I utilize tkinter.ttk using the same name?
> Or is that not possible? Will I have to use to separate names, like this:

No. One name for one object.

import tkinter as tk
import tkinter.ttk as ttk

Yes

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to