GRASS Programmer's Manual  6.4.2(2012)
p.db.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 ############################################################################
00003 #
00004 # MODULE:       p.db
00005 # AUTHOR(S):    Jachym Cepicky, Markus Neteler, Hamish Bowman
00006 #               Converted to Python by Huidae Cho
00007 # PURPOSE:      Start stand-alone attribute table manager
00008 # COPYRIGHT:    (C) 2009 by The GRASS Development Team
00009 #
00010 #  This program is free software; you can redistribute it and/or modify
00011 #  it under the terms of the GNU General Public License as published by
00012 #  the Free Software Foundation; either version 2 of the License, or
00013 #  (at your option) any later version.
00014 #
00015 #  This program is distributed in the hope that it will be useful,
00016 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 #  GNU General Public License for more details.
00019 #
00020 ############################################################################
00021 
00022 #%Module
00023 #% description: Start stand-alone attribute table manager
00024 #% keywords: database
00025 #%End
00026 #%Option
00027 #% key: table
00028 #% type: string
00029 #% required: yes
00030 #% multiple: no
00031 #% description: Table name
00032 #%End
00033 
00034 import os
00035 import grass.script as grass
00036 
00037 def main():
00038     table = options["table"]
00039 
00040     os.spawnlp(os.P_NOWAIT, os.environ["GRASS_PYTHON"], os.environ["GRASS_PYTHON"], "%s/etc/wxpython/gui_modules/dbm.py" % os.environ["GISBASE"], table)
00041 
00042 if __name__ == "__main__":
00043     options, flags = grass.parser()
00044     main()
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines