Project: QGIS

Version: 3.28

Feature: Addition of py-args command line parameter

When running QGIS from the command line with the --code parameter, a new --py-args utility allows the passing of arguments to the python interpreter.

Arguments between --py-args and -- are passed to the python interpreter and ignored by QGIS, so for example, when using the following command:

qgis --code /home/user/example.py --py-args --specialScriptArguments "arg1" 'arg2' -- layer1 layer2

The example.py script will have --specialScriptArguments, arg1, and arg2 passed as system arguments to the python interpreter, whilst layer1 and layer2 will be handled by QGIS normally and loaded as map layers

This feature was funded by Landesamt für Vermessung und Geoinformation Vorarlberg

This feature was developed by Damiano Lombardi