title: Get version string from argparse
body: <p>I'm trying to get back the version string I defined in <code>argparse</code> for use in logging.
  I'm using a typical setup along the lines of:</p>
  
  <pre><code>__version__ = "0.1"
  parser = argparse.ArgumentParser()
  parser.add_argument('--version', '-V', action='version', version="%(prog)s " + __version__)
  args = parser.parse_args()
  </code></pre>
  
  <p>When I print <code>parser.version()</code> or <code>parser.print_version()</code> or <code>parser.format_version()</code> I get <code>None</code>. One solution is to call <code>parser.parse_args(['-V'])</code> but that also terminates the execution of the program. I know I can just re-create the string and pass it to the logger, but I thought there must be a way to get this from <code>argparse</code>. I'm using python v2.7.5 and argparse v1.1.</p>