[GRASS-user] Problems with GRASS python code in osgeo4w

Hamish hamish_b at yahoo.com
Mon Jun 22 13:41:50 EDT 2009


Bob Moskovitz wrote:
> So, I still don't know why the grass.parser() is not
> working for me.  I even modified my program to use pdb
> to see what is happening.  The debugger is aborted
> right after I reach os.execvp("g.parser.exe", [name] + argv)
> in grass.py.  But if I use "python
> c:\osgeo4w\apps\grass\grass-6.4.0svn\scripts\m.dipslope.py --help",
> I get the expected results.


try putting 'c:\osgeo4w\apps\grass\grass-6.4.0svn\scripts' in your %PATH%.
when g.parser is complete it reruns the script but only by its filename.
If the script isn't in the PATH* it fails at that point because it
can't find it. The above seems like it should be in the path.. do other
"official" scripts in that directory work?

[*] (the current dir is typically also checked in MS Windows although it
typically is not in UNIX)

see also GRASS_ADDONS_PATH enviro variable.

for grass 7 Glynn may have just changed this a couple of days ago??



Hamish



      



More information about the grass-user mailing list