[GRASS-user] Error when importing data in Windows with Python Script

Greetings

I’m running a Python script in WinGRASS6.4 but when I insert as the input
C:\Data\L5216065_06520070405_B70.TIF

inside Python Script, the input is:
C:DataL5216065_06520070405_B10.TIF

I realized that, if I, by-hand, i change the \ by / it runs ok.

is it possible to have an automatic process to change this instead of having the users doing this by-hand?

Thanks

Luis Lisboa

Luis Lisboa wrote:

I'm running a Python script in WinGRASS6.4 but when I insert as the input
C:\Data\L5216065_06520070405_B70.TIF

inside Python Script, the input is:
C:DataL5216065_06520070405_B10.TIF

I realized that, if I, by-hand, i change the \ by / it runs ok.

is it possible to have an automatic process to change this instead of having
the users doing this by-hand?

How are you running the script? If you run it via bash, any
backslashes will be interpreted before the script is executed. There
isn't anything the script can do about this.

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

[please discussion in ML]

2010/11/5 Luis Lisboa <luislisboa1975@gmail.com>:

In a previous email you said that this implementation (the fix of "\" for
python scripts in Windows) was implemented in r44109. Itried to find it
but, I didn't find that release. I believe that it will be release tomorrow
(friday) right?

it has been fixed only in GRASS 6.5+. Now also in GRASS 6.4 - r44179.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Greetings GRASS world
About this topic, I have compiled latest week snapshot (11/06/2010) in windows (using OSGEO4W) and, when I tried to run my GRASS Python Script:
r.in.cover year=2004 input=D:\Data\PT\COVER\1.tif output=teste01 the file was not found. I had to change the bars in order to run the script. So, as far as I can see, it seems that the fix is not fully working for WinGRASS. OR the fix is not yet implemented in GRASS for Windows?
Thanks
Luis

On Sat, Nov 6, 2010 at 10:37 AM, Martin Landa <landa.martin@gmail.com> wrote:

[please discussion in ML]

2010/11/5 Luis Lisboa <luislisboa1975@gmail.com>:

In a previous email you said that this implementation (the fix of "" for
python scripts in Windows) was implemented in r44109. Itried to find it
but, I didn’t find that release. I believe that it will be release tomorrow
(friday) right?

it has been fixed only in GRASS 6.5+. Now also in GRASS 6.4 - r44179.

Martin


Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa