MCPcopy Create free account
hub / github.com/MapServer/MapServer / get_config

Function get_config

mapscript/python/setup.py:103–121  ·  view source on GitHub ↗
(option, config='mapserver-config')

Source from the content-addressed store, hash-verified

101 return output
102
103def get_config(option, config='mapserver-config'):
104
105 v = read_mapscriptvars()
106 if sys.platform == 'win32':
107 v = read_mapscriptvars()
108 return v[option]
109 command = config + " --%s" % option
110 try:
111 subprocess
112 command, args = command.split()[0], command.split()[1]
113 p = subprocess.Popen([command, args], stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)
114 (child_stdout, child_stdin) = (p.stdout, p.stdin)
115 r = child_stdout.read().strip()
116 except NameError:
117 p = popen2.popen3(command)
118 r = p[0].readline().strip()
119 if not r:
120 raise Warning(p[2].readline())
121 return r
122
123
124class ms_ext(build_ext):

Callers 2

get_mapserver_configMethod · 0.85
setup.pyFile · 0.85

Calls 1

read_mapscriptvarsFunction · 0.85

Tested by

no test coverage detected