[GRASS-dev] Re: [GRASSGUI] silly question - running a python script

Glynn Clements glynn at gclements.plus.com
Sun Jun 10 16:36:14 EDT 2007


Michael Barton wrote:

> I forgot, to send the script. Here it is. Doesn't work and I haven't updated
> main to use a list. But maybe a starting place for figuring out how to do
> scripting with python and GRASS.

If I comment out the "import wx" and "import rules", then both:

	python rules_colors.py --interface-description
and:
	chmod +x rules_colors.py
	./rules_colors.py --interface-description

work fine. Ditto for --help etc.

That indicates that the use of g.parser is okay.

BTW, what's the point of using:

	#!/usr/bin/env python

rather than:

	#!/usr/bin/python

?

AFAICT, using env in this way is a no-op.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list