<div>Hello list!!</div>
<div> </div>
<div>I'm trying to write a CSV file to work it with Excel. My python script is working, the issue is: when I import the file from excel the data comes with quotes at the beginnig and ending of the row. I don't want to have these quotes. What is wrong with my code?</div>
<div> </div>
<div>import os, csv<br>from osgeo import ogr,gdal,osr<br>from dbf import *</div>
<div>gdal.AllRegister()<br>file_list = []<br>folders = None<br>for root, folders, files in os.walk( "C:\\" ):</div>
<div> file_list.extend(os.path.join(root,fi) for fi in files if fi.endswith(".shp"))<br>writer = csv.writer(open('csv2.csv', "wb"))<br>campos = ['Ruta,Archivo,.prj']<br>writer.writerow(campos)<br>
for row, filepath in enumerate(file_list, start=1): <br> (ruta, filename) = os.path.split(filepath) <br> n = os.path.splitext(filepath)<br> p = n[0]+'.prj'<br> if os.path.exists(p):<br> aRow = [""+filepath+","+filename+",1"]<br>
writer.writerow(aRow) <br> else:<br> aRow1 = [""+filepath+","+filename+",0"]<br> writer.writerow(aRow1)</div>
<div>print "El archivo esta listo"<br></div>