<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Aahz wrote:
> > Trust the computer, the computer is your friend.
>
> However, the computer isn't a fuckin' mind reader.
>
> If you're going to post source code on the usenet, don't
> have lines longer than 72 characters. Otherwise you'll
> find your code has wrapped lines. This not only causes
> syntax errors in your choose and print statements but
> also fucks up the formatting of of printed paragraphs.
>
> Stupid human.
>

I copy-and-pasted to a file named para1.py, then wrote the following python
script with pyparsing to fix the erroneous line breaks.

-- Paul

===============================
from pyparsing import *

extraLineBreak = White(" ",exact=1) + LineEnd().suppress()
text = file("para1.py").read()
newtext = extraLineBreak.transformString(text)
file("para2.py","w").write(newtext)


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to