Hi
 on Tue, 1 Mar 2005 15:31:10 +0000  Adam Cripps <[EMAIL PROTECTED]> wrote :
 
---------------------------------------------------------------------------------------------
 Adam Cripps > > 
 Adam Cripps > Thanks Ewald - this is what I have so far, with a far from 
perfect result:
 Adam Cripps > File=open( FileName, "r")
 Adam Cripps > readlines = File.readlines()
 Adam Cripps > intcount = 0
 Adam Cripps > newcontent  =[]
 Adam Cripps > for line in readlines:
 Adam Cripps >     print line.strip()   # remove leading and trailing 
whitspace's incl. \n
 Adam Cripps >     self.contentlist[intcount].set(repr(line.strip))

 I think, here's the call missing  

        self.contentlist[intcount].set(repr(line.strip()))
                                                      ^^
 That should be the reason, why you get the reference to the method of the 
string 
 and not the content. 

 If your printing line.strip without the paranthesis you get the reference of 
the method. 
 This reference can be assigned to a variable to call it later. 


 Adam Cripps >     intcount = intcount + 1
 Adam Cripps > 
 Adam Cripps > But all the entry fields are filled with these and not the text:
 Adam Cripps > 
 Adam Cripps > <built-in method strip of str object at 0x009983B0>
 Adam Cripps > 
 Adam Cripps > I'm not sure what else to do here...
 Adam Cripps > 
 Adam Cripps > any ideas?
 Adam Cripps > 
 Adam Cripps > Thanks
 Adam Cripps > Adam
 Adam Cripps >  --
 Adam Cripps >  http://www.monkeez.org
 Adam Cripps >  PGP key: 0x7111B833
 Adam Cripps > _______________________________________________
 Adam Cripps > Tutor maillist  -  Tutor@python.org
 Adam Cripps > http://mail.python.org/mailman/listinfo/tutor
 Adam Cripps > 


 ------------------- end ----------------------

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to