I am generating new raster files from vector layers on a project. I would like to save them in the same directory as the project or layer files. How do I find this path using PyQGIS?
For python console:
you find something like
For python plugin (not tested!):
If you want to access a vector file path, on a active layer, this seems to work:
then to open a picture or text located in same directory as mylayer: