This will create __init__.py for a module path and every subdirectory
    :param path: str of the path to start adding __init__.py to
    :return: None

def create_init_files(path):
    """
        This will create __init__.py for a module path and every subdirectory
    :param path: str of the path to start adding __init__.py to
    :return: None
    """
    python_files = sorted([os.path.basename(file_)[:-3] for file_ in
                           glob.glob(os.path.join(path, '*.py'))
                           if not file_.endswith('__init__.py')])

    folders = sorted([os.path.basename(folder) for folder in os.listdir(path)
                      if os.path.isdir(os.path.join(path, folder))])
    with open(path + '/__init__.py', 'w') as fn:
        if python_files:
            [fn.write('from %s import *\n' % file_) for file_ in python_files]
            [fn.write('import %s\n' % folder) for folder in folders]
    for folder in folders:
        create_init_files(os.path.join(path, folder))