You have different ways to get what you want by PyQGIS Console:
- Aragon's suggestion;
- by using QgsGeometryAnalyzer class:
from qgis.utils import iface from qgis.analysis import QgsGeometryAnalyzer mc = iface.mapCanvas() layer = mc.activeLayercurrentLayer() QgsGeometryAnalyzer().buffer(layer, "path_to/output.shp", 500, False, False, -1) - by using Sextante class:
from sextante.core.Sextante import Sextante Sextante.runalg("ftools:fixeddistancebuffer","input_path.shp", False, 500, 5, True, "output_path_buffer.shp") To get the sextante parameters type Sextante.alghelp("ftools:fixeddistancebuffer") in PyQGIS Console.
Hope this helps !