title: Add comment for using a python script?
body: <p>Firstly, I don't know if there is some good rule or common practice for adding comments for usage of a Python script. 
  Here is my question.</p>
  
  <ol>
  <li><p>In a python script, with definition of functions, and the part below
  <code>if __name__ == '__main__':</code>, where shall I add the comment for
  usage of the part below <code>if __name__ == '__main__':</code>: on top of the
  script below the shebang, or below <code>if __name__ == '__main__':</code>?</p>
  
  <p>For example,</p>
  
  <pre><code>#!/usr/bin/env python                             
  
  
  import argparse
  
  
  def myfun():
      ...
  
  if __name__ == '__main__':
  
      parser = argparse.ArgumentParser(description='A script of writing comment of usage')
      parser.add_argument('--in', dest='in', help='an input file')
      parser.add_argument('--out', dest='out', help='an output file')
      args = parser.parse_args()
  </code></pre>
  
  <p>My comment for usage of the part below <code>if __name__ == '__main__':</code>
  is an example of calling the script:</p>
  
  <pre><code>''' Example:                                                                                                                                                   
  myscript.py --in infile --out outfile
  '''
  </code></pre>
  
  <p>where shall I add it in the script?</p></li>
  <li><p>In comment for usage of the script, besides providing an example,
  what shall I also add? I think the options are self clear in the
  <code>parser.add_argument()</code>, and the purpose of the script is self clear
  in  <code>argparse.ArgumentParser()</code>? </p>
  
  <p>For example, from the above example,  are the following enough for
  explaining the purpose and options of the script?</p>
  
  <pre><code>    parser = argparse.ArgumentParser(description='A script of writing comment of usage')
  
      parser.add_argument('--in', dest='in', help='an input file')
      parser.add_argument('--out', dest='out', help='an output file')
  </code></pre></li>
  </ol>
  
  <p>Thanks.</p>