GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
g.change.gui.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 ############################################################################
4 #
5 # MODULE: g.change.gui
6 # AUTHOR(S): Hamish Bowman
7 # PURPOSE:
8 # COPYRIGHT: (C) 2009 GRASS Development Team
9 #
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2 of the License, or
13 # (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
19 #
20 ############################################################################
21 #%Module
22 #% description: Changes the default GRASS graphical user interface (GUI) setting.
23 #% keywords: general, gui
24 #%End
25 #%Option
26 #% key: gui
27 #% type: string
28 #% required: yes
29 #% multiple: no
30 #% options: tcltk,oldtcltk,wxpython,text
31 #% label: GUI type
32 #% description: Default value: GRASS_GUI if defined otherwise tcltk
33 #% descriptions: tcltk;Tcl/Tk based GUI - GIS Manager (gis.m);oldtcltk;Old Tcl/Tk based GUI - Display Manager (d.m);wxpython;wxPython based next generation GUI;text;command line interface only
34 #%End
35 
36 # simple front end to g.gui to be used from within the GUI.
37 
38 import sys
39 from grass.script import core as grass
40 
41 def main():
42  grass.exec_command("g.gui", flags = 'nu', gui = options['gui'])
43 
44  return 0
45 
46 if __name__ == "__main__":
47  options, flags = grass.parser()
48  sys.exit(main())