@@ -0,0 +1,1114 @@
+import glob%0Aimport os%0Aimport sys%0A%0A%0A%0A%0A%0Aextensions = %5B%22.cpp%22, %22.hpp%22%5D%0A%0APATH = %22/home/youngmit/git/mocc/src%22%0A%0Adef strip( filename ):%0A    with open(filename, 'r') as f:%0A        new = %5B%5D%0A        n_white = 0%0A        for line in f:%0A            strip_line = line.rstrip()%0A            # Minus 1 for the newline%0A            n_white += len(line) - len(strip_line) - 1%0A            new.append(strip_line)%0A    with open(filename, 'w') as f:%0A        %5Bf.write('%25s%5Cn' %25 line) for line in new%5D%0A%0A    print %22Stripped %22 + str(n_white) + %22 characters of whitespace.%22%0A    return%0A%0A%0A%0Afor path, dirs, files in os.walk(PATH):%0A    for f in files:%0A        file_name, file_extension = os.path.splitext(f)%0A        if file_extension in extensions:%0A            while True:%0A                inp = raw_input(%22Treat file: %22 + f + %22? %5BY/n/q%5D: %22)%0A                if( inp == %22%22 or inp == %22y%22 or inp == %22Y%22 ):%0A                    strip(os.path.join(path, f))%0A                    break%0A                if( inp == %22n%22 or inp == %22N%22 ):%0A                    # next%0A                    continue%0A                if( inp == %22q%22 ):%0A                    exit()%0A%0A%0A%0A%0A%0A

Remove tabs and trailing whitespace