newbie namespace question

Aahz Maruch aahz at netcom.com
Tue Jul 27 19:21:11 EDT 1999


In article <m3u2qp9981.fsf at ghostplanet.dok.org>,
Chris Green  <sprout at dok.org> wrote:
>
>How can a subfunction of a method of a class access the other members
>of a class? I'm playing with pygtk and more or less munging what was
>already in the test gtk example.
>
>class TimeCalc:
>	def __init__:
>		[ snip ]
>		self.make_list()
>	def make_list():
>		s=[0 , 0]
>
>		def select_clist(self, row, col, event, selected=s):
>			print self.get_text(row,col)	
>               self.m_clist.connect("select_row", select_clist)
>	def grok_data():
>		pass
>
>Ok. Excuse the bad example but when select_clist is called, how can I
>access the previous self so that I can use self.grok_data().

If m_clist.connect() is *not* passing "self" to select_clist(), I don't
think there's anything you can do.
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>      http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6  (if you want to know, do some research)




More information about the Python-list mailing list