On Mon, Feb 10, 2014 at 8:41 AM, Markus Metz
<[email protected]>wrote:

> On Mon, Feb 10, 2014 at 12:04 PM, Moritz Lennert
> <[email protected]> wrote:
> > On 10/02/14 11:46, Markus Metz wrote:
> >>
> >> On Mon, Feb 10, 2014 at 11:26 AM, Helmut Kudrnovsky <[email protected]>
> wrote:
> >>>>>
> >>>>> Therefore we need
> >>>>> hard-coded special treatment for shell and Python scripts in order to
> >>>>> make sure that the correct interpreter is used.
> >>>
> >>>
> >>>> Just for my understanding: When you say hard-coded special treatment
> for
> >>>> shell scripts, are you speaking about the .bat files ?
> >>>
> >>>
> >>> I think yes.
> >>
> >>
> >> Or more generally, any mechanism explicitly using %GRASS_PYTHON%
> >> script.py.
> >
> >
> > But as far as I've seen, this might not be sufficient since this only
> > indicates which Python executable to use for launching the Python script,
> > but any library calls linked to that execution will involve the
> system-wide
> > installed Python. Which is different from bash scripts, where this is
> not an
> > issue.
>
> GRASS Python scripts are currently executed using the system-wide
> installed Python if it exists. No attempt has been made to explicitly
> use GRASS_PYTHON, therefore it is not possible to say if the system's
> Python would really be completely ignored.
>

If I remember correctly, Python scripts were not working from Python
scripts, they were working from command line. And we were not able to
explain why the right Python (or Python DLL) is used at one point but not
the other. If there wouldn't be shell=True [1], I would say that we need to
add it.

[1]
http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/script/core.py?rev=58952#L52



> _______________________________________________
> grass-dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to