[GRASS-dev] [GRASS GIS] #2008: grass.script's find_program() can't find modules
GRASS GIS
trac at osgeo.org
Thu Jun 20 08:13:34 PDT 2013
#2008: grass.script's find_program() can't find modules
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: reopened
Priority: critical | Milestone: 6.4.4
Component: Python | Version: svn-releasebranch64
Resolution: | Keywords: find_program()
Platform: All | Cpu: x86-64
-----------------------+----------------------------------------------------
Comment(by wenzeslaus):
About the implementation choice, g.manual(.py) is currently not working on
MS Win (7, 8) (probably, mainly) because it uses find_program to check for
the web browser. Running 'explorer' without parameters or with invalid
parameters (almost everything except for file names and URLs) returns non-
zore return code, so find_program considers it as an error and gfatal in
g.manual ends the manual with error. Moreover, it starts file explorer
('This computer' thing).
(Don't be confused with the system web browser in MS Win and explorer. The
explorer program works like e.g. gnome open, it can run another app, in
case of HTML page, and system web browser, e.g. Firefox.)
The result is that there is some group of programs which we cannot run
without consequences, explorer on MS Win is one of them. We can either
introduce another win-specific or even explorer specific conditions and
hope that other programs behaves more like grass commands, or we can use
implementation from Python authors.
I understand that with return code we simple know the most (e.g. the
broken program), but it is necessary to have GRASS so robust, especially
when there can be some consequences (such as opened window of explorer on
MS Win)?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2008#comment:17>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list