[GRASS-dev] r67535: pygrass: change dirname in set_path()

Pietro peter.zamb at gmail.com
Mon Jan 25 02:31:49 PST 2016


Hi Martin,

Sorry for the delay.

On Tue, Jan 12, 2016 at 7:11 PM, Martin Landa <landa.martin at gmail.com> wrote:
> hm, what means `dirname`? I got impression that it's used for
>
> $GRASS_ADDON_BASE/etc/r.mymodule
>
> is find by set_path('r.mymodule')
>
> $GRASS_ADDON_BASE/etc/r.mymodule/lib1
>
> is find by set_path('r.mymodule', 'lib1'). From this logic I don't
> understand why dirname must be set. Martin

dirname must be set to check if the directory is available when using
the code locally, if dirname is available in the local specified path
then add the path to sys.path, otherwise try to find the correct path
within the GRASS standard paths.
I've added some more documentation to clarify this point.

Let me know if you think is still not clear. :-)

all the best

Pietro


More information about the grass-dev mailing list