title: How to handle quotes in python argument
body: <p>I'm using <a href="https://docs.python.org/3/library/argparse.html" rel="nofollow noreferrer">Argparse</a> in python3.5. one of my required parameters is a long string that may has any character like single or double quotes. I don't want to limit user how uses this python script and force him to remove this characters. so I'm looking for a solution to handle quotes in my code.</p>
  
  <p>It's my argument parser:</p>
  
  <pre><code>class MyParser(argparse.ArgumentParser):
      def error(self, message):
          sys.stderr.write('Error: %s\n' % message)
          self.print_help()
          sys.exit(2)
  
      def msg(name=None):
          return '''python3.5 file.py Text'''
  
  parser = MyParser(description='You must pass exactly one arguments after classifier.py . Use quotes after and before the argument.', usage=MyParser.msg())
  parser.add_argument('text', help='"News Text" for classification (Required Parameter)')
  args = parser.parse_args()
  </code></pre>
  
  <p>This type of argument fails with Unrecognized error:</p>
  
  <pre><code>&gt;&gt;&gt; python3.5 file.py "Apps infected by Gooligan include "Perfect Cleaner," and more."
  Error: unrecognized arguments: Cleaner, and more.
  </code></pre>
  
  <p>And sometimes without any error:</p>
  
  <pre><code>&gt;&gt;&gt; python3.5 file.py "Now "Support is expensive, and, when you're Google or any other vendor," said Michael Jude."
  &gt;
  </code></pre>
  
  <p>I want to know reason of second type errors and solution for handle errors in my code without any attention to argument.</p>