Repair UNIX files for use on Windows

| | No TrackBacks
from __future__ import with_statement

def fixFile(fileName) :
   with open(fileName, "r") as f :
      str = f.read().replace("\r\n", "\n").replace("\r", "\n")
   with open(fileName, "w") as f :
      f.write(str)

No TrackBacks

TrackBack URL: http://www.iwebthereforeiam.com/cgi-bin/mt/mt-tb.cgi/20

Leave a comment

Verification (needed to reduce spam):

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.32-en

About this Entry

This page contains a single entry by Hugh Brown published on April 28, 2008 5:49 AM.

Thread pools in python was the previous entry in this blog.

Amazon Wishlist Buddy is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.