Difference between revisions of "Talk:GRASS Community Sprint Prague 2012"

From GRASS-Wiki
Jump to: navigation, search
(added things to fix in Prague)
 
(+Signal handling wish)
Line 1: Line 1:
 
Wishes from the user list:
 
Wishes from the user list:
  
 +
== Signal handling ==
 +
 +
The Python based scripts should catch CTRL-C to avoid that clutter is left behind and that ugly traceback in printed into the terminal.
 +
 +
Suggestion by Anne Ghisla (yet not working... ):
 +
<source lang="python">
 +
Index: lib/init/grass.py
 +
===================================================================
 +
--- lib/init/grass.py  (revision 51604)
 +
+++ lib/init/grass.py  (working copy)
 +
@@ -30,7 +30,12 @@
 +
import subprocess
 +
import re
 +
import platform
 +
+import signal
 +
 +
+# catch user-sent CTRL-C
 +
+signal.signal(signal.SIGINT, lambda a,b:cleanup())
 +
+signal.siginterrupt(signal.SIGINT, False)
 +
+
 +
# Variables substituted during build process
 +
if os.environ.has_key('GISBASE'):
 +
    gisbase = os.environ['GISBASE']
 +
</source>
 +
 +
 +
== wxGUI problems ==
 
A. Clerici: please fix
 
A. Clerici: please fix
 
* ticket https://trac.osgeo.org/grass/ticket/1564
 
* ticket https://trac.osgeo.org/grass/ticket/1564

Revision as of 05:49, 9 May 2012

Wishes from the user list:

Signal handling

The Python based scripts should catch CTRL-C to avoid that clutter is left behind and that ugly traceback in printed into the terminal.

Suggestion by Anne Ghisla (yet not working... ):

Index: lib/init/grass.py
===================================================================
--- lib/init/grass.py   (revision 51604)
+++ lib/init/grass.py   (working copy)
@@ -30,7 +30,12 @@
 import subprocess
 import re
 import platform
+import signal
 
+# catch user-sent CTRL-C
+signal.signal(signal.SIGINT, lambda a,b:cleanup())
+signal.siginterrupt(signal.SIGINT, False)
+
 # Variables substituted during build process
 if os.environ.has_key('GISBASE'):
     gisbase = os.environ['GISBASE']


wxGUI problems

A. Clerici: please fix

  • ticket https://trac.osgeo.org/grass/ticket/1564
  • ticket https://trac.osgeo.org/grass/ticket/1570
  • wxGUI bugs (GRASS6.4.2RC3 under Fedora 16):
    • In the 'Create histogram of raster map' function, the style pie and the Color for text and axes options are not working. The options run fine on the tcltk GUI and in command line mode.
    • In the 'Add scalebar and north arrow', the scale can be modified only once and the option can't be re-entered nor the scale can't be deleted. Also in this case there are no problems with the tcltk GUI.
    • the option 'Add raster cell arrows' seems not to work properly. It seems that the arrows in the Map Display cannot zoomed in. It can be checked by the following steps:
      • Load and display the aspect (Spearfish) map.
      • Open the d.rast.arrows panel through the GUI button and choose the same map aspect. Click Apply: the Map Display appears green as expected for the very high resolution.
      • Choose 10 for the 'Draw arrow every Nth grid cell:' option and none as 'Color for drawing grid or “none”' option. The arrows are displayed on the cells of aspect map.
      • To make the arrows visible choose slope as 'Raster map containing values used for arrow length:' and 10.0 as 'Scale factor for arrows'. Zoom in a very small area: the cells of aspect map are enlarged, but the density of arrows remains the same
      • The direction is correctly the same for all arrows inside the same cell but it seems that instead of having an arrow each 10 aspect cells, there is an arrow each 10 pixel of the screen (with tcltk GUI the procedure works fine)