To run global_mapper.exe
in given directory:
#!/usr/bin/env python
from subprocess import call
dir = r"C:\Program Files (x86)\GlobalMapper15"
cmdline = "global_mapper.exe script.gms variable"
rc = call(cmdline, cwd=dir) # run `cmdline` in `dir`
If you want to start the command in a new console window:
rc = call("start cmd /K " + cmdline, cwd=dir, shell=True)