Tkinter, add pressed buttons onto string display string, how to?

skanemupp at yahoo.se skanemupp at yahoo.se
Sat Apr 5 17:23:50 EDT 2008


> Just like the message says: You are trying to use `str` (on the right hand
> side of the assignment) before anything is bound to that name.
>
> Ciao,
>         Marc 'BlackJack' Rintsch


i know but i want the variable str(which i found out is a reserved
word so i changed it) to be accessible all over __init__ right?
so i tried to delcare it in __init__ in the beginning of the framework
class but then when i access it in the method Display i get that
error.

so how should i declare this variable to be able to access it
everywhere?

i want another method "calculate" that can access the same string
later and do the calculations(writing some other code now that will
read and interpret that).



More information about the Python-list mailing list