title: TypeError: 'str' does not support the buffer interface issue
body: <p>import csv
      import operator</p>
  
  <pre><code>writenames = "col1, Name, col2, col3, col4".split(",")
  reader = csv.DictReader(open("Test.csv", "rb"))
  writer = csv.DictWriter(open("Test1.csv", "wb"), \
      fieldnames=writenames)
  reorderfunct = lambda r: dict([(col, r[col]) for col in writenames])
  writer.writeheader()
  for row in reader:
      writer.writerow(reorderfunct(row)
  </code></pre>
  
  <p>outputs:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\evan.keeler\My Documents\LiClipse Workspace\Test
  Test\ColumnSwitch.py", line 10, in &lt;module&gt;
       writer.writeheader()
    File "C:\Python34\lib\csv.py", line 142, in writeheader
      self.writerow(header)
    File "C:\Python34\lib\csv.py", line 153, in writerow
      return self.writer.writerow(self._dict_to_list(rowdict))
  TypeError: 'str' does not support the buffer interface
  </code></pre>
  
  <p>I'm not sure what the issues is here?  I know that you must cast a string as bytes but I'm not sure how to do that with this particular example.  </p>