浏览代码

PyGRASS sphinx manual: added gis docs; msg cosmetics

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60132 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 11 年之前
父节点
当前提交
b71c1af8d5
共有 3 个文件被更改,包括 8 次插入8 次删除
  1. 1 1
      lib/python/pygrass/docs/index.rst
  2. 2 2
      lib/python/pygrass/docs/intro.rst
  3. 5 5
      lib/python/pygrass/gis/__init__.py

+ 1 - 1
lib/python/pygrass/docs/index.rst

@@ -23,13 +23,13 @@ Contents:
    :maxdepth: 2
 
    intro
+   gis
    raster
    vector
    attributes
    modules
 
 
-
 Indices and tables
 ==================
 

+ 2 - 2
lib/python/pygrass/docs/intro.rst

@@ -1,7 +1,7 @@
 Introduction
 =============
 
-To work with ``pygrass`` you need a up-to-date version of GRASS GIS 7.
+To work with ``pygrass`` you need an up-to-date version of GRASS GIS 7.
 You can obtain a recent version following the information provided on the
 `main Web site <http://grass.osgeo.org/download/software/>`_
 of GRASS, and you can read more about compilation on the 
@@ -11,4 +11,4 @@ The only action before starting to work with ``pygrass`` is to launch
 GRASS GIS 7 and from the console launch ``python`` or ``ipython`` 
 (the second one is the recommended way)
 
-Read more about how to work with :doc:`raster`, :doc:`vector`, :doc:`attributes`, :doc:`modules`.
+Read more about how to work with :doc:`gis`, :doc:`raster`, :doc:`vector`, :doc:`attributes`, :doc:`modules`.

+ 5 - 5
lib/python/pygrass/gis/__init__.py

@@ -13,7 +13,7 @@ from grass import script
 #from grass.script import setup
 #
 #
-#GISBASE = "/home/pietro/docdat/src/gis/grass/grass70/dist.x86_64-unknown-linux-gnu"
+#GISBASE = "/home/pietro/docdat/src/gis/grass/grass71/dist.x86_64-unknown-linux-gnu"
 #LOCATION = "nc_basic_spm_grass7'"
 #GISDBASE = "/home/pietro/docdat/gis"
 #MAPSET = "sqlite"
@@ -55,7 +55,7 @@ def _check(value, path, type):
     elif value is '':
         return getenv(type)
     else:
-        raise GrassError("%s <%s> not found." % (type.title(),
+        raise GrassError("%s <%s> not found" % (type.title(),
                                                  join(path, value)))
 
 
@@ -70,9 +70,9 @@ def set_current_mapset(mapset, location=None, gisdbase=None):
 def make_mapset(mapset, location=None, gisdbase=None):
     res = libgis.G_make_mapset(gisdbase, location, mapset)
     if res == -1:
-        raise GrassError("I cannot create a new mapset.")
+        raise GrassError("Cannot create new mapset")
     elif res == -2:
-        raise GrassError("Illegal name.")
+        raise GrassError("Illegal name")
 
 
 class Gisdbase(object):
@@ -124,7 +124,7 @@ class Gisdbase(object):
 
     def new_location(self):
         if libgis.G__make_location() != 0:
-            raise GrassError("I cannot create a new mapset.")
+            raise GrassError("Cannot create new location")
 
     def locations(self):
         """Return a list of locations that are available in the gisdbase: ::