#!/usr/bin/python3 header = """/* This file is part of Ground Control. Ground Control 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 3 of the License, or (at your option) any later version. Ground Control is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Ground Control. If not, see . */ """ from sys import argv old_file = open(argv[1], "r").read() f = open(argv[1], "w") f.write(header) f.write(old_file) f.close()