GLOBAL variables in python

python9999 at my-deja.com python9999 at my-deja.com
Tue Nov 7 12:53:41 CET 2000


i have wriiten a small application in which i need to use the variable
which is local to one of the functions in a class , but i am not able to
access the variable.

class myclass:
	def entry():
		entry1=GtkEntry(10)
		entry2=GtkEntry(10)
		......

a= myclass()

def  get():
	name=a.entry.entry1.get_text()
	return name

here i am getting a error like
	name=a.entry.entry1.get_text()
attribute error entry1

can any one suggest solution for this problem..
and i also have a doubt whether v have any GLOBAL variables in python??

thanks for any help..
regards
satish


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list