Re: [Tutor] Pythonic way to normalize vertical whitespace

2009-05-09 Thread spir
Le Fri, 08 May 2009 13:03:47 -0400, pyt...@bdurham.com s'exprima ainsi: [...] > Approaches: > 1. split text to list of lines that get stripped then: > a. walk this list building a new list of lines that track and > ignore extra blank lines > -OR- > b. re-join lines and replace '\n\n\n' wth' \n\n'

Re: [Tutor] Pythonic way to normalize vertical whitespace

2009-05-08 Thread Kent Johnson
On Fri, May 8, 2009 at 1:03 PM, wrote: > Note: Following cross-posted to python-list where it got queued due to > suspicious subject line. > > I'm looking for suggestions on technique (not necessarily code) about the > most pythonic way to normalize vertical whitespace in blocks of text so that >

Re: [Tutor] Pythonic way to normalize vertical whitespace

2009-05-08 Thread bob gailer
pyt...@bdurham.com wrote: Note: Following cross-posted to python-list where it got queued due to suspicious subject line. I'm looking for suggestions on technique (not necessarily code) about the most pythonic way to normalize vertical whitespace in blocks of text so that there is never more

[Tutor] Pythonic way to normalize vertical whitespace

2009-05-08 Thread python
Note: Following cross-posted to python-list where it got queued due to suspicious subject line. I'm looking for suggestions on technique (not necessarily code) about the most pythonic way to normalize vertical whitespace in blocks of text so that there is never more than 1 blank line between paragr