-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get path to shell/known folders on Windows #46103
Comments
|
The new module "winpath" gives easy access to Windows shell folders like |
|
The current 'path' modules such as posixpath and ntpath have functions |
|
I'm not very good in naming things. I'm open to suggestions :) |
|
I believe Microsoft advises against looking at the registry to find As for naming things: I guess an object ShellFolders in ntpath might OTOH, this is entirely ad-hoc, as tons of other Windows API is *not* The patch has no documentation. |
|
Here is a new patch which adds os.path.getshellfolders(). It uses I've implemented the API because several of my project need the path to |
Is Python supposed to still work on Windows NT 4? http://svn.python.org/projects/python/trunk/README says that support OTOH, the msdn library site removed many references to NT4 (see the doc |
|
It was never explicitly discussed, however, I always assumed that NT4 I would like to pose a policy that Python does not need to support |
|
OK. We should also remove references to older versions on the website: For testing older platforms, we can still use virtual machines. I think |
|
Amaury Forgeot d'Arc wrote:
Correct, I'm using a VMWare installation of Windows XP SP2 German and Christian |
No. Python 2.5.1 *does* support Windows 95 (I have myself tested that). |
|
I'm not sure why the approach of "load-em-all" is being taken. That said though, I don't object to the patch as it stands, and agree it |
|
Mark Hammond wrote:
Indeed, the patch targets the most basic requirements. I wanted to |
|
Sorry for interruption. I'm a little doubtful this is really needed. import ctypes
dll = ctypes.windll.shell32
buf = ctypes.create_string_buffer(300)
dll.SHGetSpecialFolderPathA(None, buf, 0x0005, False)
print buf.valueAnd if this patch goes in, I'm using clipboard in my several python # And, well, r60696 blocks me from building python on VC6, if this change |
Building with vc6 should be corrected. I filed bpo-2065. |
|
@christian: have you any interest in keeping this open or can it be closed, gien that the last comment was 2 1/2 years ago? |
|
No reply to msg110596. |
|
Oh my, this patch is rather ancient. Is this feature still of interest? I'm happy to port it from 2.6 to 3.4. |
|
See also PyXDG (http://freedesktop.org/wiki/Software/pyxdg/) and winpaths (http://ginstrom.com/code/winpaths.html). |
|
Here is a patch that returns the paths of all known SHGetKnownFolderPath() and SHGetFolderPath(). SHGetKnownFolderPath() is currently not available for Python 3.4 as Python 3.4 still uses Windows XP API but SHGetKnownFolderPath() requires Vista or newer. http://msdn.microsoft.com/en-us/library/windows/desktop/bb776911%28v=vs.85%29.aspx |
|
+1 from me for supporting this functionality in Python natively. I tried winpaths but it doesn't yet support Python 3. I've e-mailed the author so it might be considered for a future release. |
|
Is this something you still want to champion, Jason? |
|
I'm +0 at this point. I understand that appdirs is meeting this need now. |
|
Sounds like this is a candidate for the |


Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: