<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 2:17 PM, Markus Metz <span dir="ltr"><<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Feb 10, 2014 at 6:44 PM, Vaclav Petras <<a href="mailto:wenzeslaus@gmail.com">wenzeslaus@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Mon, Feb 10, 2014 at 8:41 AM, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On Mon, Feb 10, 2014 at 12:04 PM, Moritz Lennert<br>
>> <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>> wrote:<br>
>> > On 10/02/14 11:46, Markus Metz wrote:<br>
>> >><br>
>> >> On Mon, Feb 10, 2014 at 11:26 AM, Helmut Kudrnovsky <<a href="mailto:hellik@web.de">hellik@web.de</a>><br>
>> >> wrote:<br>
>> >>>>><br>
>> >>>>> Therefore we need<br>
>> >>>>> hard-coded special treatment for shell and Python scripts in order<br>
>> >>>>> to<br>
>> >>>>> make sure that the correct interpreter is used.<br>
>> >>><br>
>> >>><br>
>> >>>> Just for my understanding: When you say hard-coded special treatment<br>
>> >>>> for<br>
>> >>>> shell scripts, are you speaking about the .bat files ?<br>
>> >>><br>
>> >>><br>
>> >>> I think yes.<br>
>> >><br>
>> >><br>
>> >> Or more generally, any mechanism explicitly using %GRASS_PYTHON%<br>
>> >> script.py.<br>
>> ><br>
>> ><br>
>> > But as far as I've seen, this might not be sufficient since this only<br>
>> > indicates which Python executable to use for launching the Python<br>
>> > script,<br>
>> > but any library calls linked to that execution will involve the<br>
>> > system-wide<br>
>> > installed Python. Which is different from bash scripts, where this is<br>
>> > not an<br>
>> > issue.<br>
>><br>
>> GRASS Python scripts are currently executed using the system-wide<br>
>> installed Python if it exists. No attempt has been made to explicitly<br>
>> use GRASS_PYTHON, therefore it is not possible to say if the system's<br>
>> Python would really be completely ignored.<br>
><br>
><br>
> If I remember correctly, Python scripts were not working from Python<br>
> scripts, they were working from command line.<br>
<br>
</div></div>Which command line? If you used the msys command line, it should work<br>
because within msys, the embedded GRASS_PYTHON version is readily<br>
available:<br>
<br>
GRASS 7.0.svn> which python<br>
/c/Programme/GRASS GIS 7.0.svn/extrabin/python.exe<br>
<div class=""><br>
> And we were not able to<br>
> explain why the right Python (or Python DLL) is used at one point but not<br>
> the other.<br>
<br>
</div>If you used the GUI, you are outside the msys shell and the system's<br>
Python is used. Scripts invoke other GRASS modules with<br>
grass.run_command() which uses the system's script interpreter if the<br>
module is a script.<br>
<br></blockquote><div>So, msys is able to configure our Python in the way that it is usable without interference with the system Python.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Markus M<br>
</blockquote></div><br></div></div>