[GRASSGUI] initiating d.* command dialogs with existing parameters

Michael Barton michael.barton at asu.edu
Sat Mar 24 21:47:11 EDT 2007


On 3/24/07 6:21 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Michael Barton wrote:
> 
>> I¹ve set up a  structure (in gisutils and menuform) to pass command
>> parameters from an existing layer in the GIS Manager to the options dialog
>> when it is opened. We still need to parse existing d.* command in gismutils
>> to do this (and of course debug in menuform). This will work much easier if
>> a command is created as a list instead of a string. Glynn suggested this,
>> but there were some questions/concerns from Jachym about using spawn. I¹ll
>> hold off on finishing this until we get it settled about parsing a command
>> as a string or list.
> 
> Parsing or passing?

Both actually. Passing the parameters and parsing them at either end.

> 
> If we're willing to accept a requirement of Python 2.4 or later, then
> it appears that the subprocess module (the Popen class and the call
> convenience function) is the preferred interface.
> 
> It seems to cover all of the required cases, doesn't use a shell
> unless explicitly told to, and appears to implement all relevant
> functionality on both Unix and Windows.

I'd tried to use Popen at one point (still commented out) in the command
parser in gismutil.py. I never was able to get it to recognize the PIPE
argument. I probably specified it wrong, but I could never find out how to
get it right.

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






More information about the grass-gui mailing list