How do I find the Windows common application data folder using Python?

后端 未结 6 856
谎友^
谎友^ 2020-11-30 05:55

I would like my application to store some data for access by all users. Using Python, how can I find where the data should go?

6条回答
  •  借酒劲吻你
    2020-11-30 06:10

    Previous answer removed due to incompatibility with non-US versions of Windows, and Vista.

    EDIT: To expand on Out Into Space's answer, you would use the winpaths.get_common_appdata function. You can get winpaths using easy_install winpaths or by going to the pypi page, http://pypi.python.org/pypi/winpaths/, and downloading the .exe installer.

提交回复
热议问题