|
@@ -285,8 +285,15 @@ def make_command(prog, flags="", overwrite=False, quiet=False, verbose=False,
|
|
|
args.append("-%s" % flags)
|
|
|
for opt, val in options.iteritems():
|
|
|
if val != None:
|
|
|
- if opt[0] == '_':
|
|
|
+ if opt.startswith('_'):
|
|
|
opt = opt[1:]
|
|
|
+ warning(_("To run the module add underscore at the end"
|
|
|
+ " of the option <%s> to avoid conflict with Python"
|
|
|
+ " keywords. Underscore at the beginning is"
|
|
|
+ " depreciated in GRASS GIS 7.0 and will be removed"
|
|
|
+ " in version 7.1.") % opt)
|
|
|
+ elif opt.endswith('_'):
|
|
|
+ opt = opt[:-1]
|
|
|
args.append("%s=%s" % (opt, _make_val(val)))
|
|
|
return args
|
|
|
|
|
@@ -311,6 +318,10 @@ def start_command(prog, flags="", overwrite=False, quiet=False,
|
|
|
|
|
|
@endcode
|
|
|
|
|
|
+ If the module parameter is the same as Python keyword, add
|
|
|
+ underscore at the end of the parameter. For example, use
|
|
|
+ ``lambda_=1.6`` instead of ``lambda=1.6``.
|
|
|
+
|
|
|
@param prog GRASS module
|
|
|
@param flags flags to be used (given as a string)
|
|
|
@param overwrite True to enable overwriting the output (<tt>--o</tt>)
|