]> git.donarmstrong.com Git - lilypond.git/blob - scripts/auxiliar/strip-whitespace.py
texi-langutils.py: scan ly comments and variable names only in English doco
[lilypond.git] / scripts / auxiliar / strip-whitespace.py
1 #!/usr/bin/env python
2 import sys
3
4 for fname in sys.argv[1:]:
5   fd = open(fname,mode='U') # open in universal newline mode
6   lines = []
7   for line in fd.readlines():
8       lines.append( line.rstrip() )
9   fd.close()
10
11   fd = open(fname,mode='w')
12   fd.seek(0)
13   for line in lines:
14       fd.write(line+'\n')
15   fd.close()
16