[Tutor] A little help with TKinter please ....!!

S A buc40@bemail.org
Tue, 20 Aug 2002 12:16:26 -0700


Try returning the value and then assigning it to a variable outside the class.

class Pass:
>...    def __init__(self, x):
>...       self.x = x
>...    def new(self):
>...        y = self.x + 4
>...        return y
>
>>>>x = Pass(4)  #create an x instance pass value 4 to instance
>>>>y = x.new()
>>>>print y
>8
>>>>
>
>This is a very simple example. Hope this helps.
>SA



"I can do everything on my Mac that I used to do on my PC, plus alot more ..."

-Me

------------------------------------------------------------
Free, BeOS-friendly email accounts: http://BeMail.org/
BeOS News and Community: http://www.BeGroovy.com/


---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------