Newbie Help Please.(OO and Tkinter)

SA sarmstrong13 at mac.com
Sun Jun 16 19:38:35 EDT 2002


On 6/16/02 3:37 PM, in article aeit4p$h0s$1 at slb5.atl.mindspring.net, "Matt
Gerrans" <mgerrans at mindspring.com> wrote:

> Did you intend to be defining the method apply() inside the method savein()
> or did accidentally get that extra indentation?
> 
>>     def savin(self, question):
>>         Label(question, text="Directory:").grid(row=0)
>>         Label(question, text="Filename:").grid(row=1)
>>         self.e1 = Entry(question)
>>         self.e2 = Entry(question)
>>         self.e1.grid(row=0, column=1)
>>         self.e2.grid(row=1, column=1)
>>         def apply(self):
>>             self.dir = self.e1.get()
>>             self.fn = self.e2.get()
>>             self.sav = self.dir + self.fn
>>             self.savfile = open(self.sav, "w")
>>             for line in self.t1.readlines():
>>                 self.savefile.write(line)
>>             self.savefile.close()
> 
> 
> 
Sorry. Accidental indentation.

SA




More information about the Python-list mailing list