def expandvars(s):
    """Expand environment variables of form %var%.

    Unknown variables are left unchanged.
    """

    global _env_rx

    if '%' not in s:
        return s
    if _env_rx is None:
        import re
        _env_rx = re.compile(r'%([^|<>=^%]+)%')
    return _env_rx.sub(_substenv, s)
Expand environment variables of form %var%.

    Unknown variables are left unchanged.
    
recipes/Python/473846_Get_systemlanguageuser_dependent_paths/recipe-473846.py