[GRASS-dev] Installing own Python script

Pierre Roudier pierre.roudier at gmail.com
Mon May 30 18:06:22 EDT 2011


Hi Glynn, and thanks very much for taking the time to answer my newbie
questions,

> The r.mm.html file should not contain the parts which are generated by
> "r.mm.py --html-description". The build system does this automatically
> if the .html file doesn't contain an "<html>" tag. This ensures that
> the .html file is kept up to date if options are added, removed or
> changed.

OK, so I understand the HTML file would be generated automatically at
build time (during the "make" from the top-level dir). Does that mean
that I can't add more descriptions/references/notes to the HTML file
manually?

> The per-module "install" targets are for developers wishing to install
> individual modules after modifications. As GRASS can be run from the
> staging directory without being installed, this isn't often required.
>
> If this feature is desired for scripts, it should just be a case of
> adding a slight modification of r43657 to Script.make (change "bin" to
> "scripts" in the first command).

What I would like is:
1 - Make my r.mm script available from the GRASS prompt, the same way
other Python scripts like r.grow or r.buffer are available, so I can
test it,
2 - Most importantly, I would like to access my r.mm module from other
Python scripts using eg grass.run_command('r.mm', input = input, ...,
flags = flags, quiet = quiet)

Does that mean I should recompile GRASS entirely after each
modification made to my r.mm module, or is the per-module install
option just doing that (sorry I'm not sure I got it right)?

Many thanks,

Pierre

-- 
Scientist
Landcare Research, New Zealand


More information about the grass-dev mailing list