On 6/10/07 1:36 PM, "Glynn Clements" <[EMAIL PROTECTED]> wrote:
>
> 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.
I needed import wx and import rules to launch an interactive window in
wxPython. I wonder why they cause problems.
>
> 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
>
It's that way in the modules in the svn. In the past, I've had trouble with
the Python shbang on my Mac and so can't really tell which is better. My
Python is in /usr/bin however.
>
> AFAICT, using env in this way is a no-op.
Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
_______________________________________________
grass-dev mailing list
[email protected]
http://grass.itc.it/mailman/listinfo/grass-dev