2
############################################################################
5
# AUTHOR(S): Jachym Cepicky, Michael Barton, Martin Landa, Markus Neteler,
7
# Converted to Python by Huidae Cho
8
# PURPOSE: To establish and control use of a graphics display monitor.
9
# COPYRIGHT: (C) 2009 by The GRASS Development Team
11
# This program is free software; you can redistribute it and/or modify
12
# it under the terms of the GNU General Public License as published by
13
# the Free Software Foundation; either version 2 of the License, or
14
# (at your option) any later version.
16
# This program is distributed in the hope that it will be useful,
17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
# GNU General Public License for more details.
21
############################################################################
24
#% description: To establish and control use of a graphics display monitor.
30
##% description: List all monitors
35
##% description: List all monitors (with current status)
40
##% description: Print name of currently selected monitor
45
##% description: Release currently selected monitor
50
##% description: Do not automatically select when starting
58
#% description: Name of graphics monitor to start (p0-p9)
66
##% description: Name of graphics monitor to stop
74
##% description: Name of graphics monitor to select
82
##% description: Name of graphics monitor to unlock
86
import grass.script as grass
89
start = options["start"]
90
# select = options["select"]
91
# stop = options["stop"]
92
# unlock = options["unlock"]
94
# create the command file
95
command_file = grass.tempfile()
96
os.system("g.gisenv set=GRASS_PYCMDFILE=%s" % command_file)
99
os.spawnlp(os.P_NOWAIT, os.environ["GRASS_PYTHON"], os.environ["GRASS_PYTHON"], "%s/etc/wxpython/gui_modules/mapdisp.py" % os.environ["GISBASE"], start, command_file)
102
# if stop != "" or select != "" or unlock != "":
103
# grass.message(_("Not implemented yet"), "w")
105
if __name__ == "__main__":
106
options, flags = grass.parser()