Package imagizer :: Module winpath |
[hide private]
[frames] | no frames]

# Module winpath

source code

Functions for getting system/language/user dependent paths on windows.

All path names returned by the functions of this module are unicode strings.

Version: 0.1

Date: $Date: 2010-04-28 19:44:10 $

Author: Christopher Arndt

Copyright: Python license

Functions | [hide private]
_substenv(m) | source code
expandvars(s) Expand environment variables of form %var%. | source code
_get_reg_value(key, subkey, name) Return registry value specified by key, subkey, and name. | source code
_get_reg_user_value(key, name) Return a windows registry value from the CURRENT_USER branch. | source code
_get_reg_machine_value(key, name) Return a windows registry value from the LOCAL_MACHINE branch. | source code
get_appdata() Return path of directory where apps should store user specific data. | source code
get_common_shellfolders() Return mapping of shell folder names (all users) to paths. | source code
get_homedir() Return path to user home directory, i.e. | source code
get_sharedconf(prog, *args) Return path to shared configuration data for 'prog' from 'vendor'. | source code
get_shellfolders(branch=HKCU, key=SHELL_FOLDERS) Return mapping of shell folder names (current user) to paths. | source code
get_userconf(vendor, prog, *args) Return path to user configuration data for 'prog' from 'vendor'. | source code
get_windir() Convenience function to get path to windows installation directory. | source code

Variables | [hide private]
| __module__ = `"winpaths"`
| __revision__ = `"$Rev$"`
| SHELL_FOLDERS = `r'Software\Microsoft\Windows\CurrentVersion\Ex`...``
| USER_SHELL_FOLDERS = `r'Software\Microsoft\Windows\CurrentVersi`...``
| HKCU = `_winreg.HKEY_CURRENT_USER`
| HKLM = `_winreg.HKEY_LOCAL_MACHINE`
| _env_rx = `None`

Function Details | [hide private]

### expandvars(s) | source code
Expand environment variables of form %var%. Unknown variables are left unchanged.

### _get_reg_value(key, subkey, name) | source code
Return registry value specified by key, subkey, and name. Environment variables in values of type REG_EXPAND_SZ are expanded if possible.

### get_homedir() | source code
Return path to user home directory, i.e. 'My Files'.

### get_sharedconf(prog, *args) | source code
Return path to shared configuration data for 'prog' from 'vendor'. Additional arguments are appended via os.path.join(). See also: get_user_conf()

### get_userconf(vendor, prog, *args) | source code
Return path to user configuration data for 'prog' from 'vendor'. Additional arguments are appended via os.path.join(), e.g. use like this: optionsfn = get_userconf("ACME Soft", "Exploder", "Options.xml")

Variables Details | [hide private]

  ### SHELL_FOLDERS Value:
      r'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'

  ### USER_SHELL_FOLDERS Value:
      r'Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folder
      s'