[GRASS-dev] RE : formatting expressions for r.mapcalc in GRASS6.4.3

Helena Mitasova hmitaso at ncsu.edu
Wed May 1 17:47:16 PDT 2013


I might have missed it but I am wondering whether the mapcalc now works reliably in the command console on Windows.


Helena Mitasova
Associate Professor
Department of Marine, Earth, and Atmospheric Sciences
2800 Faucette Drive, Rm. 1125 Jordan Hall
North Carolina State University
Raleigh, NC 27695-8208
hmitaso at ncsu.edu

"All electronic mail messages in connection with State business which are sent to or received by this account are subject to the NC Public Records Law and may be disclosed to third parties.” 

On Mar 17, 2013, at 8:09 PM, Robert Lagacé wrote:

> 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
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

More information about the grass-dev mailing list