title: Accessing argument values for argparse in Python
body: <p>I am trying to set up some simple flag arguments for my program but cannot figure out how to access them.  I have the argparser:</p>
  
  <pre><code>   parser = argparse.ArgumentParser(description='Simple PostScript Interpreter')
     parser.add_argument('-s', action="store_true")
     parser.add_argument('-d', action="store_true")
     parser.parse_args(sys.argv[1:])
  </code></pre>
  
  <p>The program should take either <code>sps.py -s</code>, <code>sps.py -d</code>, or <code>sps.py</code> on the command line. Then I just want to check whether or not the <code>-s</code> flag was set or the <code>-d</code> flag was set. If neither were set, then just default to -d.</p>
  
  <p>What do I need to do to access the boolean values that are set by the parser?</p>