[GRASS-dev] RE : formatting expressions for r.mapcalc in GRASS6.4.3
Robert Lagacé
Robert.Lagace at fsaa.ulaval.ca
Sun Mar 17 17:09:32 PDT 2013
I look at the code friday night (the file utils.py) and it seems to contains some functions
to deals with Windows/Unix and some 'HACK' as writen in comments.
What is the purposeof the function "split(s)"?
I think that the question/problem is more profond than that this "split()" funtion.
I am developping an application in Python/wxPython that is working on both Linux and Windows.
Wth that experience I will try come back in a few weeks to make a proposal/suggestions.
But does not solve the problem in the mean time. With which version of Python and Windows
the students are working?
Robert Lagacé
________________________________________
De : grass-dev-bounces at lists.osgeo.org [grass-dev-bounces at lists.osgeo.org] de la part de Markus Neteler [neteler at osgeo.org]
Date d'envoi : 17 mars 2013 18:48
À : Glynn Clements
Cc : GRASS developers list
Objet : Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3
On Sun, Mar 17, 2013 at 12:23 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
...
> Replace the split() function in core/utils.py with:
>
> def split(s):
> """!Platform spefic shlex.split"""
> if sys.platform == "win32":
> return shlex.split(s.replace('\\', r'\\'))
> else:
> return shlex.split(s)
I have tested attached patch (which I hope is the same as the suggested change),
it lead to a complete GUI error. I tried to catch it with a screenshot
but was to
slow. I can try harder if needed.
Markus
More information about the grass-dev
mailing list