def ExpandMacros(string, expansions):
  if '$' in string:
    for old, new in expansions.iteritems():
      assert '$(' not in new, new
      string = string.replace(old, new)
  return string
Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
dataset/ETHPy150Open adobe/brackets-shell/gyp/pylib/gyp/msvs_emulation.py/ExpandMacros