Is there a way, ideally using autodoc
, to get sphinx to document a Python script? The section of the script I want documented is the portion protected by:
if __name__ == '__main__':
i.e. the bit that only runs if the module is used as a script instead of being imported.