Let us say I have a file
myfile.py
"""
long documentation of myfile.py
...
"""
# tons of stuf
# this include some functions and their documentation
and I would like to do
bash $ python myfile.py -h
such that it displays all the documentation but does not execute the tons of stuff
. (I don't care if the option is --help
instead of -h
.)
I am pretty sure I have already seen it somewhere but I can't find it. Is it related to this question and to this second question?