Tkinter & Tkconstants



Hi,
I was reading through the Tkinter tutorial at
http://www.pythonware.com/library/tkinter/introduction/index.htm ...and
it mentions that by doing,

from Tkinter import *

you have access to the constants in Tkconstants, since Tkinter imports
it automatically.

However, in the shell if I do..

from Tkinter import *

print Tkinter.HORIZONTAL

I get an error..NameError: Tkinter is not defined

any ideas? However, if I do,

import Tkconstants
print Tkconstants.HORIZTONAL

I get what i expect. but according to the tutorial i should only need
Tkinter.

Thanks.

.



Relevant Pages

  • Re: Tax Calculator--Tkinter
    ... Better import Tkinter. ... import Tkinter, Tkconstants ... def getIncome: ... income = float) ...
    (comp.lang.python)
  • Using Tix and Tkinter
    ... import Tix ... from Tkconstants import * ... from Tkinter import * ... root = Tix.Tk ...
    (comp.lang.python)
  • Re: Odd behavior in Python/Tkinter?
    ... Lie wrote: ... import Tkinter as Tk ... from Tkconstants import * ... root = Tk.Tk ...
    (comp.lang.python)
  • Re: Fast text display?
    ... > obviously used it yourself, if I end up going with tkinter, are there ... I've used the text widget and found it to be fast enough for what I ... though I didn't exactly stress it. ... Prev by Date: ...
    (comp.lang.python)
  • Re: GUI tookit for science and education
    ... Thank you all for valuable responses. ... I think I will stick to Tk and Tkinter. ... Registered Linux User #220771 ... Prev by Date: ...
    (comp.lang.python)

Loading