Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. import fileinput, sys
  2.  
  3. for line in fileinput.input(inplace=1):
  4. # convert Windows/DOS text files to Unix files
  5. if line[-2:] == "\r\n":
  6. line = line[:-2] + "\n"
  7. sys.stdout.write(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement