It seems the answer linked here doesn't work in latest version of QGIS 2.14
layer = QgsVectorLayer("/home/reyman/Projets/cours/coursPython/pyQgis/shape/passages/passages.shp", "passages", "ogr")
if not layer.isValid():
print "Layer failed to load!"
QgsVectorFileWriter.writeAsVectorFormat(layer, "wkt.csv", "utf-8", None, "CSV", layerOptions='GEOMETRY=AS_WKT')
return the warning :
Warning 6: layer creation option 'G' is not formatted with the key=value format
Warning 6: layer creation option 'E' is not formatted with the key=value format
Warning 6: layer creation option 'O' is not formatted with the key=value format
Warning 6: layer creation option 'M' is not formatted with the key=value format
Warning 6: layer creation option 'E' is not formatted with the key=value format
Warning 6: layer creation option 'T' is not formatted with the key=value format
Warning 6: layer creation option 'R' is not formatted with the key=value format
Warning 6: layer creation option 'Y' is not formatted with the key=value format
Warning 6: '' is an unexpected value for layer creation option of type string-select.
Warning 6: layer creation option 'A' is not formatted with the key=value format
Warning 6: layer creation option 'S' is not formatted with the key=value format
Warning 6: layer creation option '_' is not formatted with the key=value format
Warning 6: layer creation option 'W' is not formatted with the key=value format
Warning 6: layer creation option 'K' is not formatted with the key=value format
Warning 6: layer creation option 'T' is not formatted with the key=value format