Changes between Initial Version and Version 1 of Ticket #2873, comment 7
- Timestamp:
- 01/25/16 03:14:00 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified Ticket #2873, comment 7
initial v1 1 1 I 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. 2 2 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.: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.: 4 4 5 5 {{{#!python … … 10 10 }}} 11 11 12 This could be expanded to creating temporary Locations /Mapsets:12 This could be expanded to creating temporary Locations / Mapsets: 13 13 {{{#!python 14 14 import grass.some_namespace.GrassSession … … 19 19 }}} 20 20 21 or even creating new locations/mapsets:21 or even creating new Locations / Mapsets: 22 22 {{{#!python 23 23 import grass.some_namespace.GrassSession