|
@@ -430,9 +430,14 @@ def get_interface_description(cmd):
|
|
|
|
|
|
@param cmd command (name of GRASS module)
|
|
@param cmd command (name of GRASS module)
|
|
"""
|
|
"""
|
|
|
|
+ if sys.platform == 'win32' and os.path.splitext(cmd)[1] == '.py':
|
|
|
|
+ args = [sys.executable, cmd, '--interface-description']
|
|
|
|
+ else:
|
|
|
|
+ args = [cmd, '--interface-description']
|
|
|
|
+
|
|
try:
|
|
try:
|
|
- cmdout, cmderr = Popen([cmd, '--interface-description'], stdout = PIPE,
|
|
|
|
- stderr = PIPE).communicate()
|
|
|
|
|
|
+ cmdout, cmderr = Popen(args, stdout = PIPE,
|
|
|
|
+ stderr = PIPE).communicate()
|
|
except OSError, e:
|
|
except OSError, e:
|
|
raise ScriptError, _("Unable to fetch interface description for command '%(cmd)s'."
|
|
raise ScriptError, _("Unable to fetch interface description for command '%(cmd)s'."
|
|
"\n\nDetails: %(det)s") % { 'cmd' : cmd, 'det' : e }
|
|
"\n\nDetails: %(det)s") % { 'cmd' : cmd, 'det' : e }
|