GLOBAL variables in python

Pearu Peterson pearu at ioc.ee
Tue Nov 7 14:14:36 EST 2000


On Tue, 7 Nov 2000 python9999 at my-deja.com wrote:

> class myclass:
> 	def entry():
> 		entry1=GtkEntry(10)
> 		entry2=GtkEntry(10)
> 		......
> here i am getting a error like
> 	name=a.entry.entry1.get_text()
> attribute error entry1

Try:

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





More information about the Python-list mailing list