[GRASS-dev] [GRASS-SVN] r67282 - grass/trunk/lib/python/script

Martin Landa landa.martin at gmail.com
Mon Dec 21 08:09:30 PST 2015


Hi,

2015-12-21 15:33 GMT+01:00 Vaclav Petras <wenzeslaus at gmail.com>:
> I think this is too risky. If I understand it correctly, it puts all the GUI
> modules/packages on path. So, one will get:

right.

> Considering the amount and naming, it is likely to get name collision. This
> will happen even if the caller doesn't have any interest in GUI.
>
> Simple way to solve this would be adding GUI to path optionally by a
> parameter or by providing a separate function.

I used just for now the simple way (r67308).

> Better way to solve this is probably putting GUI modules/packages to a
> bigger package. Let's say grassgui, or perhaps grasswxgui. Another option is
> to have grass.wxgui package. In this case, putting things to etc/python/
> would be mandatory, in the other cases it is optional.

Assuming that the most of users will need only to run g.gui.* modules
via run_command() it would be probably enough to add path check to the
every g.gui.* module...

Ma

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa


More information about the grass-dev mailing list