You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR will allow to pass arguments to the script provided via --code parameter and more generally to each python execution. All arguments after --py-args till -- are passed over to the python interpreter and ignored by QGIS.
Note: After --code-args is not possible to pass any other parameter than -- to QGIS
For example:
qgis --code /home/domi/test.py --py-args --specialScriptArguments "a text arg" 'and another arg' -- layer1 layer2
test.py will have this content in sys.argv: ['/home/domi/test.py', '--specialScriptArguments', 'a text arg', 'and another arg']
layer1 and layer2 will be normally handled by QGIS as layers to load
Commits tagged with [need-docs] or [FEATURE]
The text was updated successfully, but these errors were encountered:
Request for documentation
From pull request qgis/QGIS#50092
Author: @domi4484
QGIS version: 3.28
New command line parameter --py-args
PR Description:
This PR will allow to pass arguments to the script provided via
--code
parameter and more generally to each python execution. All arguments after--py-args
till--
are passed over to the python interpreter and ignored by QGIS.Note: After
--code-args
is not possible to pass any other parameter than--
to QGISFor example:
test.py
will have this content insys.argv
:['/home/domi/test.py', '--specialScriptArguments', 'a text arg', 'and another arg']
layer1
andlayer2
will be normally handled by QGIS as layers to loadCommits tagged with [need-docs] or [FEATURE]
The text was updated successfully, but these errors were encountered: