Ok at utils.py at line 21 I placed:<div>import shlex</div><div>and at the bottom of the file (linhe 424) I placed</div><div><div>def split(s):</div><div> return shlex.split(s, posix = (sys.platform != "win32"))</div>
<div><br></div><div>And I still got this error. Did I did something wrong?</div><div><br></div><br><div class="gmail_quote">On Mon, Oct 18, 2010 at 2:24 PM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
Luis Lisboa wrote:<br>
<br>
> > No, but wxGUI's "command prompt" is using shlex.split(), which mimics<br>
> > a typical Unix shell:<br>
> ><br>
> > >>> shlex.split(r'C:\Data\L5216065_06520070405_B70.TIF')<br>
> > ['C:DataL5216065_06520070405_B70.TIF']<br>
> ><br>
> > I suspect that it should have "posix = False" on Windows:<br>
> ><br>
> > >>> shlex.split(r'C:\Data\L5216065_06520070405_B70.TIF', posix =<br>
> > False)<br>
> > ['C:\\Data\\L5216065_06520070405_B70.TIF']<br>
><br>
</div><div class="im">> About this, What can i do to fix this? Or isn't anything I can do?<br>
<br>
</div>I suggest filing a bug report via <a href="http://trac.osgeo.org/grass/" target="_blank">http://trac.osgeo.org/grass/</a><br>
<br>
In terms of a fix ... in gui_modules/utils.py, add:<br>
<br>
import shlex<br>
<br>
def split(s):<br>
return shlex.split(s, posix = (sys.platform != "win32"))<br>
<br>
The tricky part is deciding which occurrences of shlex.split() should<br>
be replaced. It's possible that some of them need to retain the POSIX<br>
syntax conventions (where a backslash quotes the following character).<br>
I suspect that those in prompt.py should be changed, but I'm not sure<br>
about the others.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</div></div></blockquote></div><br></div>