g.gui.rlisetup.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/usr/bin/env python
  2. ############################################################################
  3. #
  4. # MODULE: g.gui.rlisetup
  5. # AUTHOR(S): Luca Delucchi <lucadeluge gmail.com>
  6. # PURPOSE: RLi Setup to create configuration file for r.li modules
  7. # COPYRIGHT: (C) 2012 by Luca Delucchi, and the GRASS Development Team
  8. #
  9. # This program is free software; you can 1redistribute it and/or
  10. # modify it under the terms of the GNU General Public License as
  11. # published by the Free Software Foundation; either version 2 of the
  12. # License, or (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful, but
  15. # WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. # General Public License for more details.
  18. #
  19. ############################################################################
  20. #%module
  21. #% description: Configuration tool for r.li modules.
  22. #% keyword: general
  23. #% keyword: GUI
  24. #% keyword: raster
  25. #% keyword: landscape structure analysis
  26. #%end
  27. import os
  28. import wx
  29. import grass.script as grass
  30. from core.giface import StandaloneGrassInterface
  31. from core.globalvar import CheckWxVersion
  32. from core.utils import _, GuiModuleMain
  33. from rlisetup.frame import RLiSetupFrame
  34. def main():
  35. app = wx.App()
  36. if not CheckWxVersion([2, 9]):
  37. wx.InitAllImageHandlers()
  38. frame = RLiSetupFrame(parent=None, giface=StandaloneGrassInterface())
  39. frame.Show()
  40. frame.CenterOnScreen()
  41. app.MainLoop()
  42. if __name__ == "__main__":
  43. options, flags = grass.parser()
  44. GuiModuleMain(main)