[GRASS-dev] [GRASS GIS] #1945: wingrass: Command Line can't find grass.python libs

GRASS GIS trac at osgeo.org
Tue Apr 23 17:44:56 PDT 2013


#1945: wingrass: Command Line can't find grass.python libs
----------------------+-----------------------------------------------------
 Reporter:  hamish    |       Owner:  grass-dev@…              
     Type:  defect    |      Status:  new                      
 Priority:  critical  |   Milestone:  6.4.3                    
Component:  Python    |     Version:  svn-develbranch6         
 Keywords:  wingrass  |    Platform:  MSWindows XP             
      Cpu:  x86-32    |  
----------------------+-----------------------------------------------------

Comment(by hamish):

 ok, seems fixed in devbr6 with r55960. a couple outstanding issues-

  - init.bat adds %GISBASE%/etc/wpython to %PYTHONPATH%, but nothing else
 seems to, and a g.gui wxGUI started from the cmd.exe Command Line seems to
 work fine with wxNviz, wxVdigit, etc.. Going to the python console tab in
 the layer manager and doing
 {{{
 import os
 print os.getenv('PYTHONPATH')
 }}}
 shows that the GUI itself isn't adding the wxpython dir to $PYTHONPATH (at
 least the one that python console sees; not sure if it is shared with the
 gui process). so is having etc/wxpython in PYTHONPATH not needed at all?

  - even with 'g.gisenv set="GRASS_GUI=tcltk"' the module GUIs started from
 the cmd.exe get wxpython GUIs. When running from the msys terminal those
 get tcltk ones. not a big problem, but why?
    - ok, I see now, there's an enviro var %GRASS_GUI%=text also set, and
 parser.c looks for an enviro var setting before the g.gisenv GRASS_GUI
 setting. "text" is ignored, so the fallback is to wxpython. Perhaps
 GRASS_GUI=text should call the old text "GRASS_UI_TERM" based parser
 instead?
    - after setting the %GRASS_GUI% enviro var to tcltk, I get an error in
 the cmd.exe window:
 {{{
 'C:\Program' is not recognized as an internal or external command,
 operable program or batch file.
 }}}

 perhaps this line in parser.c's G_gui_tcltk() needs extra quoting around
 $env(GISBASE)?
 {{{
 fprintf(fp, "source $env(GISBASE)/etc/gui.tcl\n");
 }}}


 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1945#comment:4>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list