Opened 11 years ago

Closed 10 years ago

#1768 closed defect (duplicate)

wingrass6.x: python addon scripts aren't working

Reported by: hellik Owned by: grass-dev@…
Priority: critical Milestone: 6.4.4
Component: Python Version: svn-releasebranch64
Keywords: wingrass, python, addon Cc:
CPU: x86-64 Platform: MSWindows 7


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                                                                   
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)

and the wxgui-g.extension manager

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


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


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:


but the related bat-files are in:


the content of the related bat-files (e.g. is:

@"%GRASS_SH%" "%GISBASE%/scripts/" %*

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/" %*

(2) should the related bat-files be renamed? => r.basin.bat

because python addon scripts can invoke another python addon script (e.g.):
 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?






Change History (5)

comment:1 by hamish, 11 years ago

For g6 there is an include/Make/Python.make, which it is unclear to me if it should be used for python addons scripts instead of re-using (shell)Script.make?, even though there are not really any python scripts outside of the special GUI cases there are ones in the g6 addons repo which need it.

Likewise, for g7, Script.make has been repurposed for python scripts, but some accommodation should be available for end-users' personal shell scripts in some "Shell.make" or similar. There is a Python.make in g7 too, but it just seems to run the .pyc compiler.

Also in the tools/ script, there is an open question: should .py scripts have the exe bit set or not?

AFAIK we are all in agreement that python scripts should have .py extensions in the source code repo(s), then the *.make rules strip those off at install time.


comment:2 by hamish, 10 years ago

see also #1555

comment:3 by hamish, 10 years ago

Component: AddonsPython

see also #1196 and #2010.

comment:4 by wenzeslaus, 10 years ago

Main part of the issue continued in #2138. For GRASS 7, see #2150 and Handling of Python scripts on MS Windows (nabble).

in reply to:  4 comment:5 by hellik, 10 years ago

Resolution: duplicate
Status: newclosed

Replying to wenzeslaus:

Main part of the issue continued in #2138. For GRASS 7, see #2150 and Handling of Python scripts on MS Windows (nabble).

see r59764 and r59765 . closing ticket as more or less duplicate, continued in #2138.

Note: See TracTickets for help on using tickets.