Adds, modifies removes a header text in all *.py files in a python package

    header_start -> string indicating the begin of the header e.g. '#<<<<<<<<<'
    header_text -> the header text e.g. '#copyright John Doe 2033\n#licensed under GPLv3'
    header_end -> string indicating the end of the header e.g. '#>>>>>>>>>'

    package_path -> relative or absolute path of the package to modify e.g. 'C:\\...\\myPackage'
    remove_header -> Set to True to remove the header in every py file in the package

def setHeader(package_path,
              header_start='', header_end='', header_text='',
              remove_header=False,
              exclude_init=True, exclude_empty_files=True):
    """
    Adds, modifies removes a header text in all *.py files in a python package

    header_start -> string indicating the begin of the header e.g. '#<<<<<<<<<'
    header_text -> the header text e.g. '#copyright John Doe 2033\n#licensed under GPLv3'
    header_end -> string indicating the end of the header e.g. '#>>>>>>>>>'

    package_path -> relative or absolute path of the package to modify e.g. 'C:\\...\\myPackage'
    remove_header -> Set to True to remove the header in every py file in the package
    """

    pkg_name = os.path.split(package_path)[-1]

    if not os.path.exists(package_path):
        Exception("ERROR: given path '%s' not valid" % package_path)

    py_files = _findPyFiles(package_path, exclude_init)
    print('found %s py files in package %s' % (len(py_files), pkg_name))
    for path in py_files:
        print(path)
        _setHeaderInPyFile(path, header_start, header_text,
                           header_end, remove_header, exclude_empty_files)
    print('done.')