title: convert list of data object to csv
body: <p>I'm using python 2.7.6. I would like to convert my list of objects into csv format. I have a list of cdr object, this object contains some string, int and datatime object.</p>
  
  <pre><code>class cdr():
      def __init__(self):
          # some init
  
      def __iter__(self):
          return iter(self.name, self.my_value,self.my_datetime)
  
  #from another class
  import csv
  def make_csv(self, cdr_list):
      with open(self.file_name, 'wb') as csv_file:
          wr = csv.writer(csv_file, delimiter=",")
          for cdr in cdr_list:
              wr.writerow(cdr)
  </code></pre>
  
  <p>But i'm getting a blank csv. Thanks for help. </p>