12345678910111213141516171819202122232425 |
- """
- @package startup.guiutils
- @brief General GUI-dependent utilities for GUI startup of GRASS GIS
- (C) 2018 by Vaclav Petras the GRASS Development Team
- This program is free software under the GNU General Public License
- (>=v2). Read the file COPYING that comes with GRASS for details.
- @author Vaclav Petras <wenzeslaus gmail com>
- This is for code which depend on something from GUI (wx or wxGUI).
- """
- from core.gcmd import RunCommand
- def SetSessionMapset(database, location, mapset):
- """Sets database, location and mapset for the current session"""
- RunCommand("g.gisenv", set="GISDBASE=%s" % database)
- RunCommand("g.gisenv", set="LOCATION_NAME=%s" % location)
- RunCommand("g.gisenv", set="MAPSET=%s" % mapset)
|