Import csv into QGIS using Python
There is a parenthesis missing from the end of  your --6 line of code.
I am attempting to import a file into QGIS using a python script.  I'm having a problem getting it to accept the CRS.  Code so far
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from qgis.core import *
from qgis.utils import iface
----1 Set file name here
InFlnm='Input.CSV'
---2 Set pathname here
InDrPth='G:/test'
---3 Build the file name and path for uri
InFlPth="file:///"+InDrPth+InFlnm
---4 Set import Sting here note only need to set x and y others come for free!
uri = InFlPth+"?delimiter=%s&xField=%s&yField=%s" % (",","x","y")
---5 Load the points into a layer
bh = QgsVectorLayer(uri, InFlnm, "delimitedtext")
---6 Set the CRS (Not sure if this is working seems to?)
bh.setCrs(QgsCoordinateReferenceSystem(32365, QgsCoordinateReferenceSystem.EpsgCrsId)
---7 Display the layer in QGIS (Here I get a syntax error?)
QgsMapLayerRegistry.instance().addMapLayer(bh)
Now all the above works OK and QGIC prompts me for a CRS before executing the last line of the script to display the layer - as long as I comment-out step 6
However, if a attempt to set the CRS removing ### from step 6 I get a syntax error reporting on the last line that displays the points (Step 7).  Note sure what the trick is here - I'm pretty new to Python but know my way around some other programming lagnuages