[GRASS-SVN] r37546 - grass/trunk/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 27 17:27:58 EDT 2009


Author: martinl
Date: 2009-05-27 17:27:58 -0400 (Wed, 27 May 2009)
New Revision: 37546

Added:
   grass/trunk/lib/python/all.py
Modified:
   grass/trunk/lib/python/Makefile
   grass/trunk/lib/python/__init__.py
   grass/trunk/lib/python/grasspythonlib.dox
Log:
grass.script.all added
		 (merge from devbr6, r37545)


Modified: grass/trunk/lib/python/Makefile
===================================================================
--- grass/trunk/lib/python/Makefile	2009-05-27 21:25:33 UTC (rev 37545)
+++ grass/trunk/lib/python/Makefile	2009-05-27 21:27:58 UTC (rev 37546)
@@ -7,7 +7,7 @@
 GDIR = $(PYDIR)/grass
 DSTDIR = $(GDIR)/script
 
-MODULES = core db raster vector
+MODULES = core db raster vector all
 
 PYFILES := $(patsubst %,$(DSTDIR)/%.py,$(MODULES) __init__)
 

Modified: grass/trunk/lib/python/__init__.py
===================================================================
--- grass/trunk/lib/python/__init__.py	2009-05-27 21:25:33 UTC (rev 37545)
+++ grass/trunk/lib/python/__init__.py	2009-05-27 21:27:58 UTC (rev 37546)
@@ -1,4 +1,6 @@
-import core
-import db
-import raster
-import vector
+all = ['core',
+       'db',
+       'raster',
+       'vector',
+       'all'
+       ]

Copied: grass/trunk/lib/python/all.py (from rev 37545, grass/branches/develbranch_6/lib/python/all.py)
===================================================================
--- grass/trunk/lib/python/all.py	                        (rev 0)
+++ grass/trunk/lib/python/all.py	2009-05-27 21:27:58 UTC (rev 37546)
@@ -0,0 +1,4 @@
+from core   import *
+from db     import *
+from raster import *
+from vector import *

Modified: grass/trunk/lib/python/grasspythonlib.dox
===================================================================
--- grass/trunk/lib/python/grasspythonlib.dox	2009-05-27 21:25:33 UTC (rev 37545)
+++ grass/trunk/lib/python/grasspythonlib.dox	2009-05-27 21:27:58 UTC (rev 37546)
@@ -30,13 +30,13 @@
 Usage:
 
 \code
-from grass.script import core[,db[,raster,[vector]]] as grass
+from grass.script import all as grass
 \endcode
 
-e.g. to import functions from "core" and "vector" modules use
+or just import selected module, e.g.
 
 \code
-from grass.script import core, vector as grass
+from grass.script import core as grass
 \endcode
 
 Sample script



More information about the grass-commit mailing list