save the rules to file after web updates or program changes

def save_rules(self, op_file):
        """ 
        save the rules to file after web updates or program changes 
        """
        with open(op_file, 'w') as f:
            for m in self.maps:
                f.write(m.format_for_file_output())