g.change.gui.py 1.5 KB

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