[GRASS-SVN] r55395 - grass/trunk/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 15 10:53:35 PDT 2013


Author: wenzeslaus
Date: 2013-03-15 10:53:35 -0700 (Fri, 15 Mar 2013)
New Revision: 55395

Modified:
   grass/trunk/gui/wxpython/lmgr/pyshell.py
Log:
wxGUI/PyShell: pygrass and giface available

Modified: grass/trunk/gui/wxpython/lmgr/pyshell.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/pyshell.py	2013-03-15 17:12:55 UTC (rev 55394)
+++ grass/trunk/gui/wxpython/lmgr/pyshell.py	2013-03-15 17:53:35 UTC (rev 55395)
@@ -24,6 +24,8 @@
 from wx.py.version import VERSION
 
 import grass.script as grass
+import grass.pygrass as pygrass
+import grass.pygrass.modules as pgmodules
 
 class PyShellWindow(wx.Panel):
     """!Python Shell Window"""
@@ -36,8 +38,19 @@
             _("Type %s for more GRASS scripting related information.") % "\"help(grass)\"" + "\n" + \
             _("Type %s to add raster or vector to the layer tree.") % "\"AddLayer()\"" + "\n\n"
         self.shell = PyShell(parent = self, id = wx.ID_ANY,
-                             introText = self.intro, locals = {'grass' : grass,
-                                                               'AddLayer' : self.AddLayer})
+                             introText = self.intro,
+                             locals={'grass': grass,
+                                     'pygrass': pygrass,
+                                     'r': pgmodules.raster,
+                                     'r3': pgmodules.raster3D,
+                                     'v': pgmodules.vector,
+                                     'i': pgmodules.imagery,
+                                     'db': pgmodules.database,
+                                     'g': pgmodules.general,
+                                     'ps': pgmodules.postscript,
+                                     't': pgmodules.temporal,
+                                     'giface': self.parent._giface,  # for experimetal reasons only
+                                     'AddLayer': self.AddLayer})
         
         sys.displayhook = self._displayhook
         



More information about the grass-commit mailing list