[GRASS-dev] [GRASS GIS] #1768: wingrass6.x: python addon scripts aren't working

GRASS GIS trac at osgeo.org
Tue Oct 23 07:21:40 PDT 2012


#1768: wingrass6.x: python addon scripts aren't working
-------------------------------------+--------------------------------------
 Reporter:  hellik                   |       Owner:  grass-dev@…              
     Type:  defect                   |      Status:  new                      
 Priority:  critical                 |   Milestone:  6.4.4                    
Component:  Addons                   |     Version:  svn-releasebranch64      
 Keywords:  wingrass, python, addon  |    Platform:  MSWindows 7              
      Cpu:  x86-64                   |  
-------------------------------------+--------------------------------------
 tested with

 {{{
 System Info
 GRASS version: 6.4.3svn
 GRASS SVN Revision: 53519
 GIS Library Revision: 50937 (2012-02-25)
 GDAL/OGR: GDAL 1.9.2, released 2012/10/08
 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)
 }}}

 and the wxgui-g.extension manager

 exe-addons are installed here (e.g.):

 {{{
 C:\Users\xxxxx\AppData\Roaming\GRASS6\addons
 r.xtent.exe
 }}}

 shell addon scripts and their related bat-files are in the same folder
 (e.g.):

 {{{
 C:\Users\xxxxx\AppData\Roaming\GRASS6\addons
 v.rast.stats2
 v.rast.stats2.bat
 }}}

 the content of the related bat (e.g. v.rast.stats2.bat) is:

 {{{
 @"%GRASS_SH%" "%GRASS_ADDON_PATH%/v.rast.stats2" %*
 }}}

 shell scripts are working now (see ticket #1692).


 there are also some nice python scripts for grass6.x in the addons

 python addon scripts (i.e.) are placed at the moment into:

 {{{
 C:\Users\xxxxx\AppData\Roaming\GRASS6\addons
 r.basin.py
 r.ipso.py
 r.wf.py
 }}}

 but the related bat-files are in:

 {{{
 C:\Users\xxxxx\AppData\Roaming\GRASS6\addons\bin
 r.basin.py.bat
 r.ipso.py.bat
 r.wf.py.bat
 }}}

 the content of the related bat-files (e.g. r.basin.py.bat) is:

 {{{
 @"%GRASS_SH%" "%GISBASE%/scripts/r.basin.py" %*
 }}}

 the nice python addons scripts aren't working in the moment.

 following issues:

 '''(1)''' should the content of the related bat-files be changed to?:

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

 '''(2)''' should the related bat-files be renamed?

 r.basin.py.bat => r.basin.bat

 because python addon scripts can invoke another python addon script
 (e.g.):

 {{{
 r.basin.py
 [...]
  grass.run_command('r.ipso', map = 'r_elevation_crop',
                                   image = prefix, flags = 'ab')
 [...]
 }}}

 '''(3)''' should the related bat-files be moved like shell script bat-
 files?

 from

 {{{
 C:\Users\xxxxx\AppData\Roaming\GRASS6\addons\bin
 }}}

 to

 {{{
 C:\Users\xxxxx\AppData\Roaming\GRASS6\addons
 }}}

 Helmut

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1768>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list