[GRASSGUI] Re: [grass-addons] r509 -
trunk/grassaddons/gui/gui_modules
Michael Barton
michael.barton at asu.edu
Mon Apr 16 03:32:19 EDT 2007
Daniel,
Should we start going through and switching instances of os.system to
os.execvp? What is the correct syntax for something like this...
vcmd = "v.what -a map=%s east_north=%f,%f distance=%f" % \
(vectstr, float(x), float(y), qdist)
os.system(vcmd)
Is it...?
vcmd = ['v.what', '-a', 'map='+vectstr, 'east_north=%f,%f' % ( float(x),
float(y)), 'distance='+qdist]
os.execvp(vcmd)
What about os.popen and Popen?
Finally, how do we return the properly built command from buildCmd to put
into os.execvp?
thanks
Michael
On 4/15/07 11:00 PM, "calvelo at grass.itc.it" <calvelo at grass.itc.it> wrote:
> Log:
> - better test task: use with 'test' as the grass command
> - now cmdPanel may be queried by (i) buildCmd, which returns an array of
> arguments and (ii) createCmd, which is the usual cmdline string. This allows
> for both system-style use (with the usual quote madness), and a saner
> execve-style command launch.
__________________________________________
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