title: How can I print a Python file's docstring when executing it?
body: <p>I have a Python script with a docstring. When the parsing of the command-line arguments does not succeed, I want to print the docstring for the user's information.</p>
  
  <p>Is there any way to do this?</p>
  
  <h2>Minimal example</h2>
  
  <pre><code>#!/usr/bin/env python
  """
  Usage: script.py
  
  This describes the script.
  """
  
  import sys
  
  
  if len(sys.argv) &lt; 2:
      print("&lt;here comes the docstring&gt;")
  </code></pre>