Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 109

Show
Ignore:
Timestamp:
12/29/04 16:58:57
Author:
rboerma
Message:

changed \n --> \r\n for text files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/linefeed.py

    r101 r109  
    2323            print filename, "Binary!" 
    2424            continue 
    25         newdata = data.replace('\r\n','\n') 
     25        if os.path.splitext(filename)[1].lower() == '.txt': 
     26            newdata = data.replace('\n','\r\n') 
     27        else: 
     28            newdata = data.replace('\r\n','\n') 
    2629        if newdata != data: 
    2730            print filename 

Hosted by WebFaction

Log in as guest/cpguest to create tickets