aboutsummaryrefslogtreecommitdiff
path: root/tools/refactoring/trim.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/refactoring/trim.py')
-rw-r--r--tools/refactoring/trim.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/refactoring/trim.py b/tools/refactoring/trim.py
deleted file mode 100644
index 5539f5fef7..0000000000
--- a/tools/refactoring/trim.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-import fileinput
-
-# Defaults
-TABSIZE = 4
-
-usage = """
-Replaces all TAB characters with %(TABSIZE)d space characters.
-In addition, all trailing space characters are removed.
-usage: trim file ...
-file ... : files are changed in place without taking any backup.
-""" % vars()
-
-def main():
-
- if len(sys.argv) == 1:
- sys.stderr.write(usage)
- sys.exit(2)
-
- # Iterate over the lines of all files listed in sys.argv[1:]
- for line in fileinput.input(sys.argv[1:], inplace=True):
- line = line.replace('\t',' '*TABSIZE); # replace TABs
- line = line.rstrip(None) # remove trailing whitespaces
- print line # modify the file
-
-if __name__ == '__main__':
- main()