Include __main__.py in sphinx-apidoc generated files
问题 I am not able to add my __main__.py file correctly and its functions while generating RST file with sphinx-apidoc . Other files and classes are generated correctly. I works only if I run sphinx-apidoc with -P parameter which includes private modules. But I do not want to add private methods of other modules, I need these from __main__.py only. __main__.py looks like this: def main(): """ main() description here """ f1() f2() if __name__ == '__main__': main() I would like to have main() , f1()