Kaynağa Gözat

wxGUI: d.rast3d pythonized
(merge from devbr6, https://trac.osgeo.org/grass/changeset/33020)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33021 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 17 yıl önce
ebeveyn
işleme
7008bb1c7a
1 değiştirilmiş dosya ile 9 ekleme ve 13 silme
  1. 9 13
      gui/wxpython/scripts/d.rast3d

+ 9 - 13
gui/wxpython/scripts/d.rast3d

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env python
 #
 ############################################################################
 #
@@ -16,25 +16,21 @@
 #
 #############################################################################
 
-#%Module
+#%module
 #%  description: Displays 3d raster data in the active frame on the graphics monitor.
 #%  keywords: display, raster3d
-#%End
+#%end
+
 #%option
 #% key: map
 #% type: string
 #% gisprompt: old,grid3,3d-raster
 #% description: 3D raster map to be displayed
 #% required : yes
-#%END
-
-if  [ -z "$GISBASE" ] ; then
- echo "You must be in GRASS GIS to run this program." >&2
- exit 1
-fi
+#%end
 
-if [ "$1" != "@ARGS_PARSED@" ] ; then
-  exec g.parser "$0" "$@"
-fi
+import grass
 
-exit 0
+if __name__ == "__main__":
+    options, flags = grass.parser()
+    main()