title: Use Python to parse comma separated string with text delimiter coming from stdin
body: <p>I have a csv file that is being fed to my Python script via stdin.</p>
  
  <p>This is a comma separated file with quotations as text delimiter.</p>
  
  <p>Here is an example line:</p>
  
  <pre><code>457,"Last,First",NYC
  </code></pre>
  
  <p>My script so far, splits each line by looking for commas, but how do I make it aware of the text delimiter quotes?</p>
  
  <p>My current script:</p>
  
  <pre><code>for line in sys.stdin:   
      line = line.strip()
      line.split(',')
      print line
  </code></pre>
  
  <p>The code splits the name into two since it does not recognize the quotations enclosing that text field. I need the name to remain as a single element.</p>
  
  <p>If it matters, the data is being fed through stdin within a hadoop-streaming program.</p>
  
  <p>Thanks!</p>