Python/pygrass: Difference between revisions
< Python
m (add new test) |
(Add workshops material) |
||
Line 1: | Line 1: | ||
''pygrass'' is a library that extends the GRASS capabilities to allow users to access the low-level GRASS API. | ''pygrass'' is a library that extends the GRASS capabilities to allow users to access the low-level GRASS API. | ||
== Workshops == | |||
=== XIV Italian meeting of GRASS and GFOSS users === | |||
Two workshops were presented during the [http://geomorfolab.arch.unige.it/genova2013/ XIV Italian meeting of GRASS] at Genova. | |||
The workshops use '''ipython notebook''' to show the python and pygrass API, all the material are available on github ([https://github.com/zarch/workshop-python python], [https://github.com/zarch/workshop-pygrass pygrass]). All the execute examples are reported here: | |||
* python | |||
** [http://www.ing.unitn.it/~zambelli/workshop/python/python-DataTypes.html Data Types] | |||
** [http://www.ing.unitn.it/~zambelli/workshop/python/python-Syntax.html Syntax] | |||
** [http://www.ing.unitn.it/~zambelli/workshop/python/python-Function.html Function] | |||
** [http://www.ing.unitn.it/~zambelli/workshop/python/python-Class.html Class] | |||
** [http://www.ing.unitn.it/~zambelli/workshop/python/python-Other.html Other] | |||
* pygrass | |||
** [http://www.ing.unitn.it/~zambelli/workshop/pygrass/pygrass-Modules.html Modules] | |||
** [http://www.ing.unitn.it/~zambelli/workshop/pygrass/pygrass-GIS.html GIS] | |||
** [http://www.ing.unitn.it/~zambelli/workshop/pygrass/pygrass-Vector.html Vector] | |||
** [http://www.ing.unitn.it/~zambelli/workshop/pygrass/pygrass-Raster.html Raster] | |||
== How to test library == | == How to test library == |
Revision as of 10:47, 15 February 2013
pygrass is a library that extends the GRASS capabilities to allow users to access the low-level GRASS API.
Workshops
XIV Italian meeting of GRASS and GFOSS users
Two workshops were presented during the XIV Italian meeting of GRASS at Genova. The workshops use ipython notebook to show the python and pygrass API, all the material are available on github (python, pygrass). All the execute examples are reported here:
- python
How to test library
pygrass has doctest inside its code. You can run doctest inside the North Carolina basic location, using the mapset user1.
To test the single module (file) you have to move to the source code of pygrass and run the following code (this is an example of functions.py):
python -m doctest functions.py
Already tested modules
Working
- functions.py
- gis/region.py
- gis/__init__.py
- modules/__init.py
- vector/abstract.py
- vector/__init__.py
- vector/basic.py
- vector/table.py
- vector/geometry.py
- raster/abstract.py