I think the Pythonic way to do this is

    'APPDATA' if os.name.lower() == 'nt' else 'HOME'