But we should consider moving it into grass/script/utils.py or similar.
Indeed I think would be useful to clearly distinguish the GUI from
other functionalities.
And would also fix things like:
{{{# gui/wxpython/core/toolboxes.py:53
def GetSettingsPath():
# this is for cases during compilation and it is not possible to import wx
# TODO: if the function would be in the grass Python library there would
# no need to do this
try:
from core.utils import GetSettingsPath as actualGetSettingsPath
return actualGetSettingsPath()
except ImportError:
# expecting that there will be no such path
# (these files are always check for existence here)
return ""
}}}
So how to proceed? Should I move this function to grass.script.utils
and then just import the function definition in
gui/wxpython/core/utils.py?
Should I just fix all the following imports in the GRASS source code:
On Mon, Feb 15, 2016 at 4:09 AM, Pietro <peter.zamb@gmail.com> wrote:
So how to proceed? Should I move this function to grass.script.utils
and then just import the function definition in
gui/wxpython/core/utils.py?
Since the name will change (I think it should change), perhaps this option
is better as it will limit the change just to utils.py. I currently don't
see any benefit in propagating the new import and name everywhere. But you
can perhaps obsolete the GUI wrapper in documentation.