#!/usr/bin/env python # # Copyright (c) 2012 by Konstantin Dmitriev # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import os import sys def process(filename): # Read the input file inputfile_f = open(filename, 'r') inputfile_contents = inputfile_f.readlines() inputfile_f.close() # Now write results to the same file inputfile_f = open(filename, 'w') for line in inputfile_contents: if "