Steve Barnes added the comment:

Having done some checks for the practicality of auto documenting library items 
with a -m command line usage I have to say that it will not be so simple. 

Many of the library items that provide useful functionality, including zipfile 
& tarfile, are implemented as single .py files, rather than as modules so have 
no to trigger the inclusion in auto-generated documentation. 

I also tried searching for standard library items that use `if __name__ == 
"__main__":` constructs but, of course, many files simply use that to expose 
tests rather than useful functionality - so that is out as well. I even thought 
of trying for a regex that would look for this followed, in the same scope by 
argparse but of course there is no obligation to use it.

And of course main() does not HAVE to be called main so that is out.

Sorry to scotch the idea Eric!

nosy: +Steve Barnes

Python tracker <>
Python-bugs-list mailing list

Reply via email to