Paul Moore wrote:
Not My Documents, please! That's for documents, not configuration. %USERPROFILE% is actually where most other applications put stuff. The alternative would be %HOMEDRIVE%%HOMEPATH% which is what os.path.expanduser uses.
On mys system only one application has put configuration data directly into USERPROFILE. It's Python's IDLE and I don't like it. It should store its configuration under APPDATA. I also don't agree that Python extensions are configuration data. They are code, maybe plugins and the files are user editable content. Ms products like Visual Studio store files like them in My Documents.
It would probably be a good idea to have it in the core, although I'm sure it's in pywin32, and anyone coding Python on Windows will have that. Personally, I've no code that would benefit from this, so I'd be +0 on theoretical grounds only.
Python's _winreg module and pywin32 expose several functions to get the paths from the registry but I don't think it has a simple function like get_mydocuments(). Christian