title: replace None with Null, in place
body: <p>I have a requirement to drop my test results into a csv for reporting.  In my python test code when I don't have a value, my variables are filled in the python way with None.  </p>
  
  <p>I have been asked to replace these with "Null" in the CSV for the reporting tool.  I am thinking this is easy and has probably be solved a hundred times.  </p>
  
  <p>Here is the code I came up with:</p>
  
  <pre><code>   for field in (TestCase.productUnderTest,TestCase.versionUnderTest,TestCase.name,TestCase.results,TestCase.lastTestEnd,TestCase.parent,TestCase.level):
          if field == None: 
               field = 'Null'
  
      ME.csvoutput.write("%s,%s,%s,%s,%s,%s,%s\n" % (TestCase.productUnderTest,TestCase.versionUnderTest,TestCase.name,TestCase.results,TestCase.lastTestEnd,TestCase.parent,TestCase.level))
  </code></pre>
  
  <p>Unfortunately that only changes the field within the scope of the for loop.  How can I change it for the scope of the write statement.  </p>
  
  <p>(I would be quite happy to just write "Null" and leave my variables unchanged, but I can work either way.)</p>