how come .insert() don't work

Bennie bennie at rotzjes.nl
Wed Oct 27 19:50:31 EDT 2004


Martin v. Löwis wrote:
> Bennie wrote:
> 
>> def tekst_in(self, tag):
>>         tekst_tag={'p': '\t\t<p>\n\n\t\t</p>\n', 'br': '<br />'}
>>         self.tekst.insert(INSERT, tekst_tag[tag])
>>
>> Then I get a AttributeError...
>> I seached the net, can come op white a answer.
> 
> 
> What specific attribute is mentioned in the AttributeError?
> That self has no attribute tekst, or that self.tekst has
> no attribute insert?
> 
> If the former, you need to arrange your class so that self has
> an attribute tekst (e.g. by initializing tekst in __init__).
> 
> If the latter: what kind of thing is self.tekst?
> 
> Regards,
> Martin
self.tekst is a Tkinter.Text() so it has a insert attribute, .insert()



More information about the Python-list mailing list