title: Parsing a string with spaces from command line in Python
body: <p>Is there a way to call my program in python and pass it a string I want it to parse without declaring the string as <code>'String I want to parse'</code> but as <code>String I want to parse</code></p>
  
  <pre><code>import argparse
  
  #Parse command line for input
  parser = argparse.ArgumentParser(description='Parse input string')
  #position input argument
  parser.add_argument('string', help='Input String')
  
  args = parser.parse_args()
  arg_str = args.string
  
  print(arg_str)
  </code></pre>
  
  <p>when I run <code>$ python test.py String I want to parse</code> I get the error: <code>test.py: error: unrecognized arguments: I want to parse
  </code></p>
  
  <p>Is there anyway to tell the script to account for spaces and take the input as one string until either the end of the input is reached or another parse argument such as <code>-s</code> is reached?</p>