title: 2.7 CSV module wants unicode, but doesn't want unicode
body: <pre><code>csvfile_ = open(finishedFileName+num+".csv","w",newline='')
  writ = csv.writer(csvfile_, dialect='excel')
  firstline = unicode(str(firstline))
  try:
      writ.writerow(firstline)
  except TypeError:
      print firstline
      print type(firstline)
      raise
  </code></pre>
  
  <p>I get a <code>TypeError: must be unicode, not str</code> with this code. When printing the type of firstline, I see <code>&lt;type 'unicode'&gt;</code>. When I print firstline, I see <code>['project_number', 'project_location']</code>(The list is longer than that, but it continues in that style.)</p>
  
  <p>This program was working fine in python 3.3. I ported it over with 3to2, switching from unix to windows as I did so.</p>
  
  <p>How do I make this program write smoothly?</p>
  
  <p>Note: This version of the csv module doesn’t support Unicode input according to the official documentation, but it told me to give it Unicode input anyway.</p>
  
  <p>Full exception</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\urightswt\Downloads\LogModToConvert.py", line 382, in &lt;module&gt;
      process(marketingLogExportFileName)
    File "C:\Users\urightswt\Downloads\LogModToConvert.py", line 123, in process
      writing(csvfile,modified,firstline)
    File "C:\Users\urightswt\Downloads\LogModToConvert.py", line 114, in writing
      writ.writerow(firstline)
  TypeError: must be unicode, not str
  </code></pre>
  
  <p>If I take out the code to make firstline unicode, I instead get </p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\urightswt\Downloads\LogModToConvert.py", line 382, in &lt;module&gt;
      process(marketingLogExportFileName)
    File "C:\Users\urightswt\Downloads\LogModToConvert.py", line 123, in process
      writing(csvfile_,modified,firstline)
    File "C:\Users\urightswt\Downloads\LogModToConvert.py", line 114, in writing
      writ.writerow(firstline)
  TypeError: must be unicode, not str
  </code></pre>