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

Over the years there have been changes in the formatting of r.mapcalc expressions
and it appears the currently there is no single way that would work everywhere
(you either need quotes or it does not work with quotes and in GRASS6.4.3 the space around = is not necessary).
I have tried to summarize our experience on MSWindows, Mac and linux here

http://courses.ncsu.edu/mea582/common/GIS_anal_grass/mapcalcformats.html

My question about the document above - is this how it should work?

If yes, should we include something like this in the manual?

For example, the ndvi example in the manual would not run from the command console on MSwindows
and the text talking about running r.mapcalc non-interactively and interactively, refers to the old way
of running GRASS before there was any GUI.
The Note about running r.mapcalc on command line can also cause some confusion - this is how that example works in the shell

GRASS 6.4.3RC2 (nc_spm_08):~ > r.mapcalc result = 'elevation * 2'
100%
GRASS 6.4.3RC2 (nc_spm_08):~ > r.mapcalc result=elevation*2
100%
GRASS 6.4.3RC2 (nc_spm_08):~ > r.mapcalc
Enter expressions, "end" when done.
mapcalc> result = 'elevation * 2'
Illegal filename. Character < > not allowed.
Invalid map <elevation * 2>
mapcalc> result=elevation*2
mapcalc> end
100%

GRASS7 is a different story, but examples in the manual for grass7 may need testing and revision too.

Helena

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@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 Fri, Feb 1, 2013 at 4:16 AM, Helena Mitasova <hmitaso@ncsu.edu> wrote:

Over the years there have been changes in the formatting of r.mapcalc expressions
and it appears the currently there is no single way that would work everywhere

I use it for a long time and have a standard formatting which always works...

...

GRASS 6.4.3RC2 (nc_spm_08):~ > r.mapcalc result = 'elevation * 2'

I use and recommend:

r.mapcalc "result = elevation * 2"

Note:
- space before and after = like this it is GRASS 7 compliant
- " expression ...": avoiding the single ' you can use shell variable
expansion like

  VAR1=2.0
  r.mapcalc "result = elevation * $VAR1"

Like this you are fine with GRASS7, too.

Markus

Helena Mitasova wrote:

Over the years there have been changes in the formatting of r.mapcalc expressions
and it appears the currently there is no single way that would work everywhere
(you either need quotes or it does not work with quotes and in GRASS6.4.3 the space around = is not necessary).
I have tried to summarize our experience on MSWindows, Mac and linux here

http://courses.ncsu.edu/mea582/common/GIS_anal_grass/mapcalcformats.html

My question about the document above - is this how it should work?

From the command line, the most portable approach is to use:

  r.mapcalc "outmap = whatever"

That should work in any version on any platform.

GRASS 6 simply concatenates all arguments with a space between each
one, and uses the result as the expression.

GRASS 7 uses G_parser():

  Usage:
   r.mapcalc [expression=string] [file=name] [--overwrite] [--verbose]
     [--quiet]

The above example is shorthand for:

  r.mapcalc expression="outmap = whatever"

For this to work, the expression must be a single argument (i.e.
quoted), and there must be a space between the output map and the
first "=". Using:

  r.mapcalc "outmap=whatever"

would result in G_parser() complaining that "outmap" isn't a
recognised option name.

--
Glynn Clements <glynn@gclements.plus.com>

On Feb 2, 2013, at 8:27 AM, Glynn Clements wrote:

Helena Mitasova wrote:

Over the years there have been changes in the formatting of r.mapcalc expressions
and it appears the currently there is no single way that would work everywhere
(you either need quotes or it does not work with quotes and in GRASS6.4.3 the space around = is not necessary).
I have tried to summarize our experience on MSWindows, Mac and linux here

http://courses.ncsu.edu/mea582/common/GIS_anal_grass/mapcalcformats.html

My question about the document above - is this how it should work?

From the command line, the most portable approach is to use:

  r.mapcalc "outmap = whatever"

That should work in any version on any platform.

Glynn, Markus,

thanks for your answer - I have used your suggested format for years and that is how we have it in the book
and it works in linux shell and on my mac in command console as well - I will add it to my little how to run mapcalc document
given that it is still valid.
But it does not work in command console in windows7, I had to remove the quotes to get it run.
I should get more feedback from students by tuesday and I will try
it in the lab again and post the error message - last two semesters, I guess since GRASS6.4.3svn there were more troubles
with r.mapcalc than before, although the command console otherwise works really great.

BTW when you look at the Notes in the manual, the suggestion there is to put single quotes around the expression (right side of the equation), while the section about raster map layer names explains that putting your expression in double quotes will
interpret it as a raster map name and the floating point section has the quotes as used in the book so if somebody is new to GRASS
it is easy to get confused.

Helena

GRASS 6 simply concatenates all arguments with a space between each
one, and uses the result as the expression.

GRASS 7 uses G_parser():

  Usage:
   r.mapcalc [expression=string] [file=name] [--overwrite] [--verbose]
     [--quiet]

The above example is shorthand for:

  r.mapcalc expression="outmap = whatever"

For this to work, the expression must be a single argument (i.e.
quoted), and there must be a space between the output map and the
first "=". Using:

  r.mapcalc "outmap=whatever"

would result in G_parser() complaining that "outmap" isn't a
recognised option name.

--
Glynn Clements <glynn@gclements.plus.com>

Helena Mitasova wrote:

BTW when you look at the Notes in the manual, the suggestion there
is to put single quotes around the expression (right side of the
equation), while the section about raster map layer names explains
that putting your expression in double quotes will interpret it as a
raster map name and the floating point section has the quotes as
used in the book so if somebody is new to GRASS it is easy to get
confused.

An outer set of quotes should be "consumed" by the shell. Windows'
cmd.exe only accepts double quotes. Unix shells accept either; within
double quotes, most forms of substition still work, while single
quotes cause everything up to the next single quote to be interpreted
literally. The wxGUI command line has its own rules (see shlex.split()
in the Python library documentation).

Map names can be quoted with either single or double quotes, so if the
expression is quoted with double quotes you can quote map names with
single quotes and vice-versa.

--
Glynn Clements <glynn@gclements.plus.com>

The wxGUI command line has its own rules (see shlex.split()
in the Python library documentation).

running mapcalc through the wxGUI command line is where the students have problems in winGRASS
(but it works on Mac)

Helmut - can you please try this commands with data in nc_spm_08
just pasting them in command console in wingrass?
- I had them originally in double quotes but that did not work for any expression,
without quotes this works:

g.region rast=landuse96_28m -p
r.mapcalc ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30)

but the students complain that the ones with if statements don't
(they say that they tried to put spaces around = and some other modifications but they keep getting syntax error):

r.mapcalc urban1_30m=if(landuse96_28m==1,1,0)+if(landuse96_28m==2,2,0)
r.mapcalc urban2_30m=if(landuse96_28m==1 || landuse96_28m==2,landuse96_28m,null()
g.region rast=elevation -p
r.mapcalc MASK=if((elevation<100 && elevation>60) && (landuse96_28m==1 || landuse96_28m==2),1,null())

so I am trying to figure out how to make r.mapcalc work in wingrass in command console
(all of these expressions work if entered through the map calculator GUI)

r.mapcalc is one of the most used commands so I think it is important to have it running reliably
and it may be just a matter of special instrcutions for wingrass in the manual page,

Thank you, Helena

Map names can be quoted with either single or double quotes, so if the
expression is quoted with double quotes you can quote map names with
single quotes and vice-versa.

--
Glynn Clements <glynn@gclements.plus.com>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Thu, Feb 14, 2013 at 5:41 PM, Helena Mitasova <hmitaso@ncsu.edu> wrote:

The wxGUI command line has its own rules (see shlex.split()
in the Python library documentation).

running mapcalc through the wxGUI command line is where the students have problems in winGRASS
(but it works on Mac)

Helmut - can you please try this commands with data in nc_spm_08
just pasting them in command console in wingrass?
- I had them originally in double quotes but that did not work for any expression,
without quotes this works:

g.region rast=landuse96_28m -p
r.mapcalc ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30)

but the students complain that the ones with if statements don't
(they say that they tried to put spaces around = and some other modifications but they keep getting syntax error):

r.mapcalc urban1_30m=if(landuse96_28m==1,1,0)+if(landuse96_28m==2,2,0)
r.mapcalc urban2_30m=if(landuse96_28m==1 || landuse96_28m==2,landuse96_28m,null()
g.region rast=elevation -p
r.mapcalc MASK=if((elevation<100 && elevation>60) && (landuse96_28m==1 || landuse96_28m==2),1,null())

One problem is caused by the pipe character. It seems that it is taken
as the end of a command and the rest is evaluated as another command.
I noticed the same problem when I wanted to execute a command
(run_command) with option separator = "|" from gui. It's a general
problem both in grass 6 and 7.

Anna

so I am trying to figure out how to make r.mapcalc work in wingrass in command console
(all of these expressions work if entered through the map calculator GUI)

r.mapcalc is one of the most used commands so I think it is important to have it running reliably
and it may be just a matter of special instrcutions for wingrass in the manual page,

Thank you, Helena

Map names can be quoted with either single or double quotes, so if the
expression is quoted with double quotes you can quote map names with
single quotes and vice-versa.

--
Glynn Clements <glynn@gclements.plus.com>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Anna,

you are right - it is the commands that include || that give an error,
I finally had time to go through all of the examples in the lab - all
the other ones work so far. Is this something that can be fixed?

Helena

On Thu, Feb 14, 2013 at 12:25 PM, Anna Kratochvílová
<kratochanna@gmail.com> wrote:

On Thu, Feb 14, 2013 at 5:41 PM, Helena Mitasova <hmitaso@ncsu.edu> wrote:

The wxGUI command line has its own rules (see shlex.split()
in the Python library documentation).

running mapcalc through the wxGUI command line is where the students have problems in winGRASS
(but it works on Mac)

Helmut - can you please try this commands with data in nc_spm_08
just pasting them in command console in wingrass?
- I had them originally in double quotes but that did not work for any expression,
without quotes this works:

g.region rast=landuse96_28m -p
r.mapcalc ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30)

but the students complain that the ones with if statements don't
(they say that they tried to put spaces around = and some other modifications but they keep getting syntax error):

r.mapcalc urban1_30m=if(landuse96_28m==1,1,0)+if(landuse96_28m==2,2,0)
r.mapcalc urban2_30m=if(landuse96_28m==1 || landuse96_28m==2,landuse96_28m,null()
g.region rast=elevation -p
r.mapcalc MASK=if((elevation<100 && elevation>60) && (landuse96_28m==1 || landuse96_28m==2),1,null())

One problem is caused by the pipe character. It seems that it is taken
as the end of a command and the rest is evaluated as another command.
I noticed the same problem when I wanted to execute a command
(run_command) with option separator = "|" from gui. It's a general
problem both in grass 6 and 7.

Anna

so I am trying to figure out how to make r.mapcalc work in wingrass in command console
(all of these expressions work if entered through the map calculator GUI)

r.mapcalc is one of the most used commands so I think it is important to have it running reliably
and it may be just a matter of special instrcutions for wingrass in the manual page,

Thank you, Helena

Map names can be quoted with either single or double quotes, so if the
expression is quoted with double quotes you can quote map names with
single quotes and vice-versa.

--
Glynn Clements <glynn@gclements.plus.com>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Helena Mitasova
Associate Professor
Department of Marine, Earth and Atmospheric Sciences
North Carolina State University
1125 Jordan Hall
NCSU Box 8208
Raleigh, NC 27695-8208
http://skagit.meas.ncsu.edu/~helena/

email: hmitaso@ncsu.edu
ph: 919-513-1327 (no voicemail)
fax 919 515-7802

Helena Mitasova wrote:

> The wxGUI command line has its own rules (see shlex.split()
> in the Python library documentation).

running mapcalc through the wxGUI command line is where the students have problems in winGRASS
(but it works on Mac)

Helmut - can you please try this commands with data in nc_spm_08
just pasting them in command console in wingrass?
- I had them originally in double quotes but that did not work for any expression,
without quotes this works:

g.region rast=landuse96_28m -p
r.mapcalc ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30)

but the students complain that the ones with if statements don't
(they say that they tried to put spaces around = and some other modifications but they keep getting syntax error):

Is this on Windows?

gui/wxpython/core/utils.py has:

  def split(s):
      """!Platform spefic shlex.split"""
      if sys.version_info >= (2, 6):
          return shlex.split(s, posix = (sys.platform != "win32"))
      elif sys.platform == "win32":
          return shlex.split(s.replace('\\', r'\\'))
      else:
          return shlex.split(s)

However: shlex.split(..., posix=False) will retain any quotes, while
posix=True removes them:

  > shlex.split('a "b c"')
  ['a', 'b c']
  > shlex.split('a "b c"', posix=False)
  ['a', '"b c"']

With posix=False, there doesn't appear any way to prevent splitting on
whitespace without also adding quotes.

From the above code, it appears that posix=False is used on Windows so

that backslash characters in filenames are treated as literal
backslashes rather than as escape characters. If that's the only
reason, then removing the "if" case may suffice.

--
Glynn Clements <glynn@gclements.plus.com>

Helmut - can you please try this commands with data in nc_spm_08
just pasting them in command console in wingrass?

sure.

tested in the wxGUI-command console with:

System Info
GRASS version: 6.4.3svn
GRASS SVN Revision: 55064
GIS Library Revision: 50937 (2012-02-25)
GDAL/OGR: 1.9.2
PROJ4: Rel. 4.8.0, 6 March 2012
Python: 2.7.2
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)

- working:

r.mapcalc
ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30)
(Fri Feb 15 16:23:42 2013) Command finished (0 sec)

r.mapcalc urban1_30m=if(landuse96_28m==1,1,0)+if(landuse96_28m==2,2,0)
(Fri Feb 15 16:24:24 2013) Command finished (0 sec)

- not working (as Anna mentioned caused by ||):

r.mapcalc urban2_30m=if(landuse96_28m==1 ||
landuse96_28m==2,landuse96_28m,null()
r.mapcalc MASK=if((elevation<100 && elevation>60) && (landuse96_28m==1 ||
landuse96_28m==2),1,null())

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/formatting-expressions-for-r-mapcalc-in-GRASS6-4-3-tp5031381p5034574.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

On Fri, Feb 15, 2013 at 2:29 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Helena Mitasova wrote:

> The wxGUI command line has its own rules (see shlex.split()
> in the Python library documentation).

running mapcalc through the wxGUI command line is where the students have problems in winGRASS
(but it works on Mac)

...

Is this on Windows?

A guest in our group has currently the same problem:

r.mapcalc 'test_rmap=log(abs(elec_accum)+1)'

Under Windows it does not work with a "syntax error" message.

gui/wxpython/core/utils.py has:

        def split(s):
            """!Platform spefic shlex.split"""
            if sys.version_info >= (2, 6):
                return shlex.split(s, posix = (sys.platform != "win32"))
            elif sys.platform == "win32":
                return shlex.split(s.replace('\\', r'\\'))
            else:
                return shlex.split(s)

However: shlex.split(..., posix=False) will retain any quotes, while
posix=True removes them:

        > shlex.split('a "b c"')
        ['a', 'b c']
        > shlex.split('a "b c"', posix=False)
        ['a', '"b c"']

With posix=False, there doesn't appear any way to prevent splitting on
whitespace without also adding quotes.

From the above code, it appears that posix=False is used on Windows so
that backslash characters in filenames are treated as literal
backslashes rather than as escape characters. If that's the only
reason, then removing the "if" case may suffice.

I don't know exactly how let our guest test that...

Markus

On Mar 15, 2013, at 10:06 AM, Markus Neteler wrote:

On Fri, Feb 15, 2013 at 2:29 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Helena Mitasova wrote:

The wxGUI command line has its own rules (see shlex.split()
in the Python library documentation).

running mapcalc through the wxGUI command line is where the students have problems in winGRASS
(but it works on Mac)

...

Is this on Windows?

A guest in our group has currently the same problem:

r.mapcalc 'test_rmap=log(abs(elec_accum)+1)'

Under Windows it does not work with a "syntax error" message.

Markus, have you tried to run this without the quotes? Or in the mapcalculator GUI?

When we skip the quotes, all expressions that I tested worked, except for those that have the pipe symbol ||
I will try the one above today. I would love to get the mapcalc working in the command console, it is very
convenient. Currently, we run all mapcalc operations in the mapcalculator GUI, which is fine with students
who are used to run things by clicking a lot anyway, but as we get to more complex workflows with more map algebra
in-between it can get tedious.

Helena

gui/wxpython/core/utils.py has:

       def split(s):
           """!Platform spefic shlex.split"""
           if sys.version_info >= (2, 6):
               return shlex.split(s, posix = (sys.platform != "win32"))
           elif sys.platform == "win32":
               return shlex.split(s.replace('\\', r'\\'))
           else:
               return shlex.split(s)

However: shlex.split(..., posix=False) will retain any quotes, while
posix=True removes them:

shlex.split('a "b c"')

       ['a', 'b c']

shlex.split('a "b c"', posix=False)

       ['a', '"b c"']

With posix=False, there doesn't appear any way to prevent splitting on
whitespace without also adding quotes.

From the above code, it appears that posix=False is used on Windows so
that backslash characters in filenames are treated as literal
backslashes rather than as escape characters. If that's the only
reason, then removing the "if" case may suffice.

I don't know exactly how let our guest test that...

Markus
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Markus Neteler wrote:

> gui/wxpython/core/utils.py has:
>
> def split(s):
> """!Platform spefic shlex.split"""
> if sys.version_info >= (2, 6):
> return shlex.split(s, posix = (sys.platform != "win32"))
> elif sys.platform == "win32":
> return shlex.split(s.replace('\\', r'\\'))
> else:
> return shlex.split(s)
>
> However: shlex.split(..., posix=False) will retain any quotes, while
> posix=True removes them:
>
> > shlex.split('a "b c"')
> ['a', 'b c']
> > shlex.split('a "b c"', posix=False)
> ['a', '"b c"']
>
> With posix=False, there doesn't appear any way to prevent splitting on
> whitespace without also adding quotes.
>
> From the above code, it appears that posix=False is used on Windows so
> that backslash characters in filenames are treated as literal
> backslashes rather than as escape characters. If that's the only
> reason, then removing the "if" case may suffice.

I don't know exactly how let our guest test that...

Tell them to modify utils.py as described above, or provide them with
a modified version.

--
Glynn Clements <glynn@gclements.plus.com>

Helmut Kudrnovsky wrote:

- working:

r.mapcalc
ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30)
(Fri Feb 15 16:23:42 2013) Command finished (0 sec)

r.mapcalc urban1_30m=if(landuse96_28m==1,1,0)+if(landuse96_28m==2,2,0)
(Fri Feb 15 16:24:24 2013) Command finished (0 sec)

- not working (as Anna mentioned caused by ||):

r.mapcalc urban2_30m=if(landuse96_28m==1 ||
landuse96_28m==2,landuse96_28m,null()
r.mapcalc MASK=if((elevation<100 && elevation>60) && (landuse96_28m==1 ||
landuse96_28m==2),1,null())

Why do you think that the problem is caused by || rather than the
spaces?

--
Glynn Clements <glynn@gclements.plus.com>

On Fri, Mar 15, 2013 at 6:17 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Helmut Kudrnovsky wrote:

- working:

r.mapcalc
ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30)
(Fri Feb 15 16:23:42 2013) Command finished (0 sec)

r.mapcalc urban1_30m=if(landuse96_28m==1,1,0)+if(landuse96_28m==2,2,0)
(Fri Feb 15 16:24:24 2013) Command finished (0 sec)

- not working (as Anna mentioned caused by ||):

r.mapcalc urban2_30m=if(landuse96_28m==1 ||
landuse96_28m==2,landuse96_28m,null()
r.mapcalc MASK=if((elevation<100 && elevation>60) && (landuse96_28m==1 ||
landuse96_28m==2),1,null())

Why do you think that the problem is caused by || rather than the
spaces?

I've noticed it multiple times that pipe character is causing
problems. For example, running command

v.db.select map=... vs=|

from auto-generated dialog is giving error (something like bad syntax)
on Windows. In most cases you don't have any problems because you
don't explicitly use the option fs/separator (usually we use default)
in the command.

Anna

--
Glynn Clements <glynn@gclements.plus.com>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Fri, Mar 15, 2013 at 6:09 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:
...

Tell them to modify utils.py as described above,

GRASS newcomers, hard to realize.

or provide them with a modified version.

I'm not able to compile winGRASS. Perhaps it is "as simple" as replacing
a file? Maybe better patch in SVN and wait for the nightly built...

Markus

On 15 March 2013 20:08, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Mar 15, 2013 at 6:09 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:
...

Tell them to modify utils.py as described above,

GRASS newcomers, hard to realize.

or provide them with a modified version.

I'm not able to compile winGRASS. Perhaps it is "as simple" as replacing
a file? Maybe better patch in SVN and wait for the nightly built...

I'm not following the discussion, so I don't know what to patch.
However, about the replacing, you can just replace the file in your
windows distribution and it will work without compilation (Python
recompiles pyc files automatically).

Markus
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Fri, Mar 15, 2013 at 8:31 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:
...

I'm not following the discussion, so I don't know what to patch.

Nor me... sorry.

Markus

Markus Neteler wrote:

> or provide them with a modified version.

I'm not able to compile winGRASS. Perhaps it is "as simple" as replacing
a file? Maybe better patch in SVN and wait for the nightly built...

No compilation is required. They just need to replace the file
etc/gui/wxpython/core/utils.py within the GRASS installation.

--
Glynn Clements <glynn@gclements.plus.com>

Markus Neteler wrote:

On Fri, Mar 15, 2013 at 8:31 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:
...
> I'm not following the discussion, so I don't know what to patch.

Nor me... sorry.

http://lists.osgeo.org/pipermail/grass-dev/2013-February/062043.html

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)

--
Glynn Clements <glynn@gclements.plus.com>