Changes between Version 13 and Version 14 of Submitting/Python
- Timestamp:
- 07/19/15 10:17:49 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Submitting/Python
v13 v14 9 9 === GRASS module === 10 10 11 Instructions for the GRASS script parser can be found in the g.parser 11 Instructions for the GRASS script parser can be found in the 12 [http://grass.osgeo.org/grass70/manuals/g.parser.html g.parser] 12 13 module's help page. 13 http://grass.osgeo.org/grass70/manuals/g.parser.html14 14 15 15 Use the directory structure to place your script appropriately into 16 16 the source tree: scripts go into `scripts` directory. 17 17 18 Also add a Makefile and a <module>.htmlfile into this directory.18 Also add a `Makefile` and a `<module>.html` file into this directory. 19 19 See existing Python scripts for examples. 20 20 … … 24 24 programmers that will need to make changes to your code. For this 25 25 purpose use Python Docstring, see 26 http://epydoc.sourceforge.net/docstrings.html 27 28 Example (fictitious header for a script called g.myscript):29 30 {{{ 31 !python26 http://epydoc.sourceforge.net/docstrings.html. 27 28 Example (fictitious header for a script called ''g.myscript''): 29 30 {{{ 31 #!python 32 32 """ 33 33 MODULE: g.myscript … … 45 45 }}} 46 46 47 The copyright protects your rights according to GNU General Public License ( www.gnu.org).47 The copyright protects your rights according to GNU General Public License (http://www.gnu.org/licenses/). 48 48 49 49 You can easily autogenerate the header and parameters from an existing 50 module using the --scriptflag. Example:50 module using the `--script` flag. Example: 51 51 52 52 {{{