GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
p.db.py
Go to the documentation of this file.
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 
22 #%Module
23 #% description: Start stand-alone attribute table manager
24 #% keywords: database
25 #%End
26 #%Option
27 #% key: table
28 #% type: string
29 #% required: yes
30 #% multiple: no
31 #% description: Table name
32 #%End
33 
34 import os
35 import grass.script as grass
36 
37 def main():
38  table = options["table"]
39 
40  os.spawnlp(os.P_NOWAIT, os.environ["GRASS_PYTHON"], os.environ["GRASS_PYTHON"], "%s/etc/wxpython/gui_modules/dbm.py" % os.environ["GISBASE"], table)
41 
42 if __name__ == "__main__":
43  options, flags = grass.parser()
44  main()