[GRASS-user] Problem with python script in osgeo4w grass 6.4.4 32bit

Helmut Kudrnovsky hellik at web.de
Sat Nov 1 15:17:32 PDT 2014


m roy wrote
> Dear all,
> 
> i made a python script for grass and it does not work in grass (version in
> message subject).
> The interface opens but a Windows error states that it is impossible to
> open the file, the
> file is hence not recognized as a valid command.
> the script used to work with osgeo4w 6.4.3 32 bit, if copied in
> "../etc/gui/scripts" directory. 

so far I know nothing about your script.

why is your script in "../etc/gui/scripts"? as it states this folder is for
GUI scripts; AFAIR this folder may be not in %PATH%.

have you any bat-wrapper for your python script in your %PATH%.

scripts's are usually in C:\OSGeo4W\apps\grass\grass-6.4.x\scripts

e.g.

d.correlate
d.font.freetype
[...]
v.what.vect

and related bat-wrapper (with appropriatly set path to the scripts) are in 

C:\OSGeo4W\apps\grass\grass-6.4.x\bin

e.g.

d.correlate.bat

{
@"%GRASS_SH%" "%GISBASE%/scripts/d.correlate" %*
}

d.font.freetype.bat

{
@"%GRASS_SH%" "%GISBASE%/scripts/d.font.freetype" %*
}

[...]
v.what.vect.bat

{
@"%GRASS_SH%" "%GISBASE%/scripts/v.what.vect" %*
}

for your python script r.your.script.py living in
C:\OSGeo4W\apps\grass\grass-6.4.x\scripts the bat-wrapper-script
r.your.script.bat should be in C:\OSGeo4W\apps\grass\grass-6.4.x\bin
with following content

{
@"%GRASS_PYTHON%" "%GISBASE%/scripts/r.your.script.py" %*
}





-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Problem-with-python-script-in-osgeo4w-grass-6-4-4-32bit-tp5170744p5170781.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list