[GRASS-dev] [GRASS GIS] #3489: integrate grass session lib

GRASS GIS trac at osgeo.org
Mon Feb 5 23:29:25 PST 2018


#3489: integrate grass session lib
--------------------------+-------------------------
  Reporter:  martinl      |      Owner:  grass-dev@…
      Type:  task         |     Status:  new
  Priority:  normal       |  Milestone:  7.6.0
 Component:  Python       |    Version:  svn-trunk
Resolution:               |   Keywords:
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------

Comment (by zarch):

 Hi Martin,

 Replying to [ticket:3489 martinl]:
 > it would be nice to integrate Python grass_session lib (1) into GRASS
 code base.

 First of all I'm fine if we want to integrate grass_session into the grass
 code.

 However, for me the main advantage of `grass_session` library is that it
 is a "standard" python library, that is installed to the python
 interpreter as other libraries do.
 Once that you have installed it, you can open your python interpreter and
 use it without the need of setting python paths, etc.

 If we include the `grass_session` to GRASS, then to be able to use the
 library we need to set the python path... I developed this small library
 because I don't want to set the python path in every script that I'm
 writing (duplicating the code... and fixing the same code multiple times),
 I would like to have a good multi-platform/tested code that I can simply
 import and use it, and If I have to fix something I have only a single
 piece of code to read/debug/fix.

 The other advantage to have as an external library is that it should be
 compatible with different GRASS7* versions.

 Include the `grass_session` into GRASS code would add the ability to
 manage multiple GRASS sessions on different locations/mapsets... that can
 still be useful some how, but the library was developed to avoid to set
 the python path for every script, and perhaps should be
 redesign/rethink...

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



More information about the grass-dev mailing list