Changes between Initial Version and Version 1 of Ticket #2873, comment 7


Ignore:
Timestamp:
Jan 25, 2016, 3:14:00 AM (8 years ago)
Author:
pmav99

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2873, comment 7

    initial v1  
    11I think that the scope of this proposal is very wide. IMHO importing dynamic libraries in a cross platform way and providing an official API are different issues.
    22
    3 WRT to providing an official API for working with GRASS Locations/Mapsets I believe that the proper python idiom is to use a [https://pymotw.com/2/contextlib/index.html#module-contextlib| context manager]. In other words, the user should not have to do anything E.g.:
     3WRT to providing an official API for working with GRASS Locations / Mapsets I believe that the proper python idiom is to use a [https://pymotw.com/2/contextlib/index.html#module-contextlib| context manager]. In other words, the user should not have to do anything E.g.:
    44
    55{{{#!python
     
    1010}}}
    1111
    12 This could be expanded to creating temporary Locations/Mapsets:
     12This could be expanded to creating temporary Locations / Mapsets:
    1313{{{#!python
    1414import grass.some_namespace.GrassSession
     
    1919}}}
    2020
    21 or even creating new locations/mapsets:
     21or even creating new Locations / Mapsets:
    2222{{{#!python
    2323import grass.some_namespace.GrassSession