TypeError

joonas keisari_ at hotmail.com
Thu Oct 26 15:04:20 EDT 2000


Btw i am not using Tkinter.
I am using Blender, that is a 3d modelling software.

I tried 
"speedgear.text = str(int(first.text) - 10)"
and it gave me error,"name error text".

Then i removed ".text" from objects and it gave me "object cant be
converted to int".

Joonas.



Fredrik Lundh wrote:
> 
> Steve wrote:
> > Look in the Tkinter documentation at the properties of buttons, and
> > you'll probably find what you need is something like
> >
> > sppedgear.text = str(int(first.text) - int(second.text))
> >
> > Hope this helps.
> 
> not that he's ever gonna tell us (why make it *easy* for
> people to help you, when you can waste everybody's time
> by playing stupid guessing games?), but it doesn't look like
> he's using Tkinter:
> 
> >>> w = Tkinter.Button()
> >>> type(w)
> <type 'instance'>
> >>> w
> <Tkinter.Button instance at 95b938>
> >>> print w
> .9812280
> 
> (Tkinter's __str__ method returns the internal widget name,
> which always starts with a dot)
> 
> btw, in Tkinter, you can get the button label as first["text"].
> Data entry widgets usually provide a "get" method.
> 
> </F>



More information about the Python-list mailing list