p.db.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env python
  2. ############################################################################
  3. #
  4. # MODULE: p.db
  5. # AUTHOR(S): Jachym Cepicky, Markus Neteler, Hamish Bowman
  6. # Converted to Python by Huidae Cho
  7. # PURPOSE: Start stand-alone attribute table manager
  8. # COPYRIGHT: (C) 2009 by The 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: Start stand-alone attribute table manager
  23. #% keywords: database
  24. #%End
  25. #%Option
  26. #% key: table
  27. #% type: string
  28. #% required: yes
  29. #% multiple: no
  30. #% description: Table name
  31. #%End
  32. import os
  33. import grass.script as grass
  34. def main():
  35. table = options["table"]
  36. os.spawnlp(os.P_NOWAIT, os.environ["GRASS_PYTHON"], os.environ["GRASS_PYTHON"], "%s/etc/wxpython/gui_modules/dbm.py" % os.environ["GISBASE"], table)
  37. if __name__ == "__main__":
  38. options, flags = grass.parser()
  39. main()