[GRASS-user] python-option for path (browse - option)

Johannes Radinger JRadinger at gmx.at
Fri Apr 29 07:23:55 EDT 2011


-------- Original-Nachricht --------
> Datum: Wed, 27 Apr 2011 14:24:25 -0700 (PDT)
> Von: Hamish <hamish_b at yahoo.com>
> An: grass-user at lists.osgeo.org, Johannes Radinger <JRadinger at gmx.at>
> Betreff: Re: [GRASS-user] python-option for path (browse - option)

> Johannes wrote:
> > I am using the options in a pyhton script,
> > and I found out to set a vector, raster and values
> > like with following lines:
> > 
> > #%option
> > #% key: input
> > #% type: string
> > #% gisprompt: old,vector,vector
> > #% description:
> > #% required: yes
> > #%end
> > 
> > But now I want to include the v.in.ascii module so
> > I want to set a full path in the options.
> > 
> > How do I get the "Browse" button in the interactive menu
> > of my script? Which kind of option do I have to define?
> 
> to see what it should look like, take an existing module you wish
> to emulate, then add --script on the command line:

Is there also the possibility to pre-set a flag so that
the box for a flag is already ticked when the script-menu is opend.

Like the #% answer: answer for the normal Options.

/Johannes


> 
> 
> GRASS> v.in.ascii --script
> ...
> #%Option
> #% key: input
> #% type: string
> #% required: no
> #% multiple: no
> #% key_desc: name
> #% description: ASCII file to be imported, if not given reads from
> standard input
> #% gisprompt: old_file,file,input
> #% guisection: Required
> #%End
> ...
> 
> Hamish
> 

-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl


More information about the grass-user mailing list