View Single Post
Old Nov 9th, 2006, 7:12 PM   #2
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,869
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
                        f = open(os.path.join(self.dirname,self.filename),'w')
                        self.text2.SetValue(f.write())
                        f.close()

What are you trying to do here? You write nothing to the file you just opened, then set self.text2 to the return value of f.write().

                        f = open(os.path.join(self.dirname,self.filename),'w')
			f.write(self.text2.SetValue(str(self.text2)))
                        f.close()

Similarily, what are you trying to do here? You're writing to the data file the return from the method "SetValue", which is NULL. That makes no sense to me.

Presumably... you would want this instead:

                        f = open(os.path.join(self.dirname,self.filename),'w')
			f.write(self.text2.GetValue())
                        f.close()

Why were you trying to set self.text2 to the value of itself anyways?
Sane is online now   Reply With Quote