[GRASS-SVN] r37326 - grass-addons/vector/v.autokrige2

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 21 08:26:04 EDT 2009


Author: aghisla
Date: 2009-05-21 08:26:04 -0400 (Thu, 21 May 2009)
New Revision: 37326

Modified:
   grass-addons/vector/v.autokrige2/v.autokrige2.py
Log:
provided an empty window


Modified: grass-addons/vector/v.autokrige2/v.autokrige2.py
===================================================================
--- grass-addons/vector/v.autokrige2/v.autokrige2.py	2009-05-21 12:21:30 UTC (rev 37325)
+++ grass-addons/vector/v.autokrige2/v.autokrige2.py	2009-05-21 12:26:04 UTC (rev 37326)
@@ -18,10 +18,47 @@
 
 #list of parameters
 
-#import directives
+#import directives. to be completed.
+import wx
+import sys
 
-#function(s)
-#@TODO
+#classes in alphabetical order
+class KrigingModule(wx.Frame):
+    """
+    Kriging module for GRASS GIS.
+    """
+    def __init__(self, parent, id=wx.ID_ANY, size=None, 
+                 style = wx.DEFAULT_FRAME_STYLE, title=None, log=None):
+        self.parent = parent
+        self.size = size
+        wx.Frame.__init__(self, parent, id, style=style, size=self.size)
+        
+        # setting properties
+        self.SetTitle("Kriging Module")
 
 #main
-#@TODO
\ No newline at end of file
+def main(argv=None):
+    if argv is None:
+        argv = sys.argv
+
+    """if len(argv) != 2:
+        print >> sys.stderr, __doc__
+        sys.exit()"""
+
+    # Command line arguments of the script to be run are preserved by the
+    # hotswap.py wrapper but hotswap.py and its options are removed that
+    # sys.argv looks as if no wrapper was present.
+    #print "argv:", `argv`
+
+    # commmented, as I don't know if the module will need it.
+    ##some applications might require image handlers
+    #wx.InitAllImageHandlers()
+
+    app = wx.PySimpleApp()
+    k = KrigingModule(parent=None, id=wx.ID_ANY, size=(300,300))
+    k.Show()
+    app.MainLoop()
+
+if __name__ == '__main__':
+    main()
+



More information about the grass-commit mailing list