title: Having issue writing to file
body: <p>I am beginning to learn python and am having some trouble getting n output to print to txt file on the desktop. I want it to be Mac and windows comptible. I keep getting a syntax error at a line that doesn't exist or no such file directory on line 4. I am trying to create the text file.</p>
  
  <pre><code>import os
  os.path.join("~","Desktop")
  output_file = open(os.path.join("~","Desktop","PythoBLASTout.txt"),"w")
  from Bio import SearchIO
  E_VALUE_THRES = 0.01
  with open('/Users/evanclark/conesnail.xml', 'rU') as input:
      for qresult in SearchIO.parse(input, "blast-xml"):
          hits = qresult.hits
          query_id = qresult.id
          if len(hits) &gt; 0:
              target_id = hits[0].id
              evalue = hits[0].hsps[0].evalue
              if evalue &lt; E_VALUE_THRES:
                  print("%s\t%s" % (query_id, target_id))
  
  
          #output_file.write("%s\t%s" % (query_id, target_id)
  </code></pre>