[GRASS-dev] Python script test

Michael Barton michael.barton at asu.edu
Mon Jul 21 14:32:29 EDT 2008


I just found out that .profile (and I suppose other shell  
configuration scripts) won't recognize backslashes as a line  
continuation in PATH or PYTHONPATH statements.

Michael


>
> Michael Barton wrote:
>
>>>> Init.sh is not updating PYTHONPATH on my Mac for some reason. I've
>>>> looked at the code and it seems fine. I DO have a PYTHONPATH. So  
>>>> I'm
>>>> not sure why it is not updating it. If I change it manually, by
>>>> simply
>>>> pasting your code (export PYTHONPATH="$GISBASE/etc/python:
>>>> $PYTHONPATH") into the GRASS prompt, PYTHONPATH IS modified
>>>> appropriately and r_in_aster.py works fine with the new grass.py
>>>> library.
>>>
>>> I suspect that /etc/profile resets PYTHONPATH. Init.sh creates a
>>> .bashrc script in the mapset directory (which, at the point that the
>>> session shell is started, is $HOME), and that script sources
>>> /etc/profile.
>>>
>>
>> That's it. PYTHONPATH is set in my .profile.
>
> ~/.profile is only read by login shells. ~/.alias is sourced if it
> exists, as well as ~/.grass.bashrc.
>
> -- 
> Glynn Clements <glynn at gclements.plus.com>



More information about the grass-dev mailing list