def ExpandEnvironmentStrings(space, w_source): "string = ExpandEnvironmentStrings(string) - Expand environment vars." try: source, source_ulen = space.utf8_len_w(w_source) res, res_ulen = rwinreg.ExpandEnvironmentStrings(source, source_ulen) return space.newutf8(res, res_ulen) except WindowsError as e: raise wrap_windowserror(space, e)
def ExpandEnvironmentStrings(space, source): "string = ExpandEnvironmentStrings(string) - Expand environment vars." try: return space.newunicode(rwinreg.ExpandEnvironmentStrings(source)) except WindowsError as e: raise wrap_windowserror(space, e)