When you run the following Python code in the Python Console of QGIS 2.4,
uri = "file:///C:/data.csv?type=csv&xField=lng&yField=lat&spatialIndex=no&subsetIndex=no&watchFile=no"
vlayer = QgsVectorLayer(uri, 'Points', "delimitedtext")
you are presented with the Coordinate Reference System Selector popup window as shown below.
Is there a way to programmatically select a CRS instead of having a user manually select it?

Tried the following but the CRS Selector dialog window still appears.
uri = "file:///C:/data.csv?type=csv&xField=lng&yField=lat&spatialIndex=no&subsetIndex=no&watchFile=no"
vlayer = QgsVectorLayer(uri, 'Points', "delimitedtext")
vlayer.setCrs( QgsCoordinateReferenceSystem(4326, QgsCoordinateReferenceSystem.EpsgCrsId) )
QgsVectorLayeraccessing to theQSettingsclass – lrssvt Oct 30 '14 at 15:17vlayer.setCrs( QgsCoordinateReferenceSystem(4326, QgsCoordinateReferenceSystem.EpsgCrsId) )and the dialog window still appears. I think its because.setCRS()is called afterQgsVectorLayer(). – Nyxynyx Oct 30 '14 at 16:25