(option, config='mapserver-config')
| 101 | return output |
| 102 | |
| 103 | def 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 | |
| 124 | class ms_ext(build_ext): |
no test coverage detected