We should be able to implement the Python version of this code idea fairly
easily. It looks like it might be the better method from a programming point
of view, as it tests for the presence of the actual flag, rather than for a
version number which will infer usage of the flag, and which could change
depending upon the development branch and backporting decisions.

On Wed, Apr 28, 2010 at 10:58 PM, Michael Barton <[email protected]>wrote:

>
>
> On Apr 28, 2010, at 10:31 PM, Hamish wrote:
>
> > oh by the way, my current favourite shell script way of testing if a flag
> > exists (yet) in a module is not to test the version/revision, but to do a
> > more direct query:
> >
> >  r.watershed --interface-description | grep -c '<flag name="f">'
> >
> > which should return 0 or 1.
> >
> >
> > Hamish
> >
>
> This won't work on Windows, however, except under msys.
>
> Michael
>



-- 
Isaac I Ullah, M.A.

Archaeology PhD Candidate,
ASU School of Evolution and Social Change

Research Assistant,
Mediterranean Landscape Dynamics Project
***************************************************
[email protected]
[email protected]

http://www.public.asu.edu/~iullah
***************************************************
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to