[reportlab-users] Preformatted problem with split and join er ror

Gisbert Amm reportlab-users@reportlab.com
Mon, 9 Dec 2002 15:10:52 +0100


> -----Original Message-----
> From: Remy C. Cool [mailto:dev-pdf@smartology.nl]
> Sent: Monday, December 09, 2002 3:00 PM
> To: reportlab-users@reportlab.com
> Join could never work since it's not imported. It works when  
> I change 
> the line from:
>  text = join(self.lines, "\n")  
> to:
>  text = string.join(self.lines, "\n")

Since Python 2.0 you can do this easier without explicitly importing the
string module using the join method of the string object:

text = '\n'.join(self.lines)

I suspect that was intended.

Regards
Gisbert Amm
http://web.de/