[Zope] structured text formatting

Jonothan Farr jfarr@real.com
Wed, 1 Mar 2000 14:35:43 -0800


>     Jonothan> Try:
> 
>     Jonothan> string.join(string.split(data, '\r\n'), '\n')
> 
> Thanks - that worked. 


No problem. 

BTW: I just discovered this neat function called string.replace(). =)

This is almost certainly faster:

    string.replace(data, '\r\n', '\n') 

I swear, not a day goes by that I don't learn something new about Python.

-jfarr

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi! I'm a signature virus.
Copy me into your .sig to join the fun!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~