[GRASS-SVN] r37545 - grass/branches/develbranch_6/lib/python

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


Author: martinl
Date: 2009-05-27 17:25:33 -0400 (Wed, 27 May 2009)
New Revision: 37545

Added:
   grass/branches/develbranch_6/lib/python/all.py
Modified:
   grass/branches/develbranch_6/lib/python/Makefile
   grass/branches/develbranch_6/lib/python/__init__.py
   grass/branches/develbranch_6/lib/python/grasspythonlib.dox
Log:
grass.script.all added


Modified: grass/branches/develbranch_6/lib/python/Makefile
===================================================================
--- grass/branches/develbranch_6/lib/python/Makefile	2009-05-27 20:57:50 UTC (rev 37544)
+++ grass/branches/develbranch_6/lib/python/Makefile	2009-05-27 21:25:33 UTC (rev 37545)
@@ -9,7 +9,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/branches/develbranch_6/lib/python/__init__.py
===================================================================
--- grass/branches/develbranch_6/lib/python/__init__.py	2009-05-27 20:57:50 UTC (rev 37544)
+++ grass/branches/develbranch_6/lib/python/__init__.py	2009-05-27 21:25:33 UTC (rev 37545)
@@ -1,4 +1,6 @@
-import core
-import db
-import raster
-import vector
+all = ['core',
+       'db',
+       'raster',
+       'vector',
+       'all'
+       ]

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


Property changes on: grass/branches/develbranch_6/lib/python/all.py
___________________________________________________________________
Name: svn:mime-type
   + text/x-python
Name: svn:keywords
   + Author Date Id
Name: svn:eol-style
   + native

Modified: grass/branches/develbranch_6/lib/python/grasspythonlib.dox
===================================================================
--- grass/branches/develbranch_6/lib/python/grasspythonlib.dox	2009-05-27 20:57:50 UTC (rev 37544)
+++ grass/branches/develbranch_6/lib/python/grasspythonlib.dox	2009-05-27 21:25:33 UTC (rev 37545)
@@ -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