g.gui.datacatalog.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/env python3
  2. ############################################################################
  3. #
  4. # MODULE: Data catalog
  5. # AUTHOR(S): Tereza Fiedlerova
  6. # PURPOSE: GRASS data catalog for browsing, modifying and managing GRASS maps
  7. # COPYRIGHT: (C) 2014-2015 by Tereza Fiedlerova, and the 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: Tool for browsing, modifying and managing GRASS maps.
  22. #% keyword: general
  23. #% keyword: GUI
  24. #% keyword: map management
  25. #%end
  26. import grass.script as gscript
  27. def main():
  28. options, flags = gscript.parser()
  29. # import wx only after running parser
  30. # to avoid issues when only interface is needed
  31. import wx
  32. from grass.script.setup import set_gui_path
  33. set_gui_path()
  34. from core.giface import StandaloneGrassInterface
  35. from datacatalog.frame import DataCatalogFrame
  36. app = wx.App()
  37. frame = DataCatalogFrame(parent=None, giface=StandaloneGrassInterface())
  38. frame.CentreOnScreen()
  39. frame.Show()
  40. app.MainLoop()
  41. if __name__ == '__main__':
  42. main()