parameters: (path_name)
docstring: Return special folder path
docstring_summary: Return special folder path
docstring_tokens: Return special folder path
function: def get_special_folder_path(path_name):
      """Return special folder path"""
      from win32com.shell import shell, shellcon
      for maybe in """
          CSIDL_COMMON_STARTMENU CSIDL_STARTMENU CSIDL_COMMON_APPDATA
          CSIDL_LOCAL_APPDATA CSIDL_APPDATA CSIDL_COMMON_DESKTOPDIRECTORY
          CSIDL_DESKTOPDIRECTORY CSIDL_COMMON_STARTUP CSIDL_STARTUP
          CSIDL_COMMON_PROGRAMS CSIDL_PROGRAMS CSIDL_PROGRAM_FILES_COMMON
          CSIDL_PROGRAM_FILES CSIDL_FONTS""".split():
          if maybe == path_name:
              csidl = getattr(shellcon, maybe)
              return shell.SHGetSpecialFolderPath(0, csidl, False)
      raise ValueError("%s is an unknown path ID" % (path_name,))
function_tokens: def get_special_folder_path ( path_name ) : from win32com . shell import shell , shellcon for maybe in """
          CSIDL_COMMON_STARTMENU CSIDL_STARTMENU CSIDL_COMMON_APPDATA
          CSIDL_LOCAL_APPDATA CSIDL_APPDATA CSIDL_COMMON_DESKTOPDIRECTORY
          CSIDL_DESKTOPDIRECTORY CSIDL_COMMON_STARTUP CSIDL_STARTUP
          CSIDL_COMMON_PROGRAMS CSIDL_PROGRAMS CSIDL_PROGRAM_FILES_COMMON
          CSIDL_PROGRAM_FILES CSIDL_FONTS""" . split ( ) : if maybe == path_name : csidl = getattr ( shellcon , maybe ) return shell . SHGetSpecialFolderPath ( 0 , csidl , False ) raise ValueError ( "%s is an unknown path ID" % ( path_name , ) )