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

Johannes Radinger JRadinger at gmx.at
Thu Apr 28 12:04:03 EDT 2011


Am 27.04.2011 um 23:24 schrieb Hamish:

> 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:

Thank you for that info!
That is what I was looking for :)

Is there also a simple way to include logos/pictures in the interactive
options menu of a script?

/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
> 



More information about the grass-user mailing list