Skip to content

[Feat] --python flag for grass79.py #703

@HuidaeCho

Description

@HuidaeCho

Is your feature request related to a problem? Please describe.

In case there are multiple installations of Python, it would be great to be able to execute the version associated with the GRASS_PYTHON environment variable for batch jobs.

Describe the solution you'd like

It can be either --exec python (a special case of --exec; if the batch job command is python, run GRASS_PYTHON instead of one in PATH; it can be a surprise though if the user intended to use non-GRASS_PYTHON in PATH, but why?) without adding a new flag, or --python path/to/script.py args... (better? but yet another flag).

Describe alternatives you've considered

Just leave it to the user. --exec /path/to/grass/python3 script.py args... with no changes.

Additional context

I encountered this issue while writing the workflow script for OSGeo4W (#692). There were two python installations from OSGeo4W (GRASS_PYTHON) and MSYS2, but MSYS2's path was in front of OSGeo4W by default. I had to specify the full path to the OSGeo4W python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions