[GRASS-SVN] r43961 - grass/trunk/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 18 06:20:11 EDT 2010
Author: martinl
Date: 2010-10-18 03:20:11 -0700 (Mon, 18 Oct 2010)
New Revision: 43961
Modified:
grass/trunk/lib/python/core.py
Log:
improve *_command() dox strings
Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py 2010-10-18 10:01:46 UTC (rev 43960)
+++ grass/trunk/lib/python/core.py 2010-10-18 10:20:11 UTC (rev 43961)
@@ -87,11 +87,11 @@
@endcode
@param prog GRASS module
- @param flags flags to be used
- @param overwrite True to enable overwriting the output (--o)
- @param quiet run quietly (--q)
- @param verbose run verbosely (--v)
- @param options
+ @param flags flags to be used (given as a string)
+ @param overwrite True to enable overwriting the output (<tt>--o</tt>)
+ @param quiet True to run quietly (<tt>--q</tt>)
+ @param verbose True to run verbosely (<tt>--v</tt>)
+ @param options module's parameters
@return list of arguments
"""
@@ -130,12 +130,12 @@
\endcode
@param prog GRASS module
- @param flags flags to be used
- @param overwrite True to enable overwriting the output (--o)
- @param quiet run quietly (--q)
- @param verbose run verbosely (--v)
- @param kwargs
-
+ @param flags flags to be used (given as a string)
+ @param overwrite True to enable overwriting the output (<tt>--o</tt>)
+ @param quiet True to run quietly (<tt>--q</tt>)
+ @param verbose True to run verbosely (<tt>--v</tt>)
+ @param kwargs module's parameters
+
@return Popen object
"""
options = {}
@@ -159,10 +159,10 @@
complete, returning its exit code. Similar to subprocess.call(), but
with the make_command() interface.
- @param args
- @param kwargs
+ @param args list of unnamed arguments (see start_command() for details)
+ @param kwargs list of named arguments (see start_command() for details)
- @return exit code
+ @return exit code (0 for success)
"""
ps = start_command(*args, **kwargs)
return ps.wait()
@@ -184,8 +184,8 @@
MONITOR='x0';
\endcode
- @param args
- @param kwargs
+ @param args list of unnamed arguments (see start_command() for details)
+ @param kwargs list of named arguments (see start_command() for details)
@return Popen object
"""
@@ -196,9 +196,9 @@
"""!Passes all arguments to start_command, but also adds
"stdin = PIPE". Returns the Popen object.
- @param args
- @param kwargs
-
+ @param args list of unnamed arguments (see start_command() for details)
+ @param kwargs list of named arguments (see start_command() for details)
+
@return Popen object
"""
kwargs['stdin'] = PIPE
@@ -208,9 +208,9 @@
"""!Passes all arguments to pipe_command, then waits for the process to
complete, returning its stdout (i.e. similar to shell `backticks`).
- @param args
- @param kwargs
-
+ @param args list of unnamed arguments (see start_command() for details)
+ @param kwargs list of named arguments (see start_command() for details)
+
@return stdout
"""
ps = pipe_command(*args, **kwargs)
@@ -227,9 +227,9 @@
parse_command(..., parse = (grass.parse_key_val, { 'sep' : ':' }))
@endcode
- @param args
- @param kwargs
-
+ @param args list of unnamed arguments (see start_command() for details)
+ @param kwargs list of named arguments (see start_command() for details)
+
@return parsed module output
"""
parse = None
@@ -251,8 +251,8 @@
"""!Passes all arguments to feed_command, with the string specified
by the 'stdin' argument fed to the process' stdin.
- @param args
- @param kwargs
+ @param args list of unnamed arguments (see start_command() for details)
+ @param kwargs list of named arguments (see start_command() for details)
@return return code
"""
@@ -266,12 +266,13 @@
"""!Interface to os.execvpe(), but with the make_command() interface.
@param prog GRASS module
- @param flags flags to be used
- @param overwrite True to enable overwriting the output (--o)
- @param quiet run quietly (--q)
- @param verbose run verbosely (--v)
- @param env environment variable (default os.environ)
- @param kwargs
+ @param flags flags to be used (given as a string)
+ @param overwrite True to enable overwriting the output (<tt>--o</tt>)
+ @param quiet True to run quietly (<tt>--q</tt>)
+ @param verbose True to run verbosely (<tt>--v</tt>)
+ @param env directory with enviromental variables
+ @param kwargs module's parameters
+
"""
args = make_command(prog, flags, overwrite, quiet, verbose, **kwargs)
if env == None:
More information about the grass-commit
mailing list