I have created a line shapefile layer (memory layer) created in Python Console of QGIS. Now I want to define the thickness of the line features that are being created. I am aware of the method by which the line styles/symbology can be imported from the existing '.qml' file.
self.setLayerSymbology(vlayer, "Parent_PermanentMarks.qml")
Is there any way by which symbology (line thickness) of the lines can be defined 'on the go' via python console?