def SetHelpMenuOtherHelp(mainMenu):
 global helpIDMap
 if (helpIDMap is None):
  helpIDMap = {}
  cmdID = win32ui.ID_HELP_OTHER
  excludeList = ['Main Python Documentation', 'Pythonwin Reference']
  firstList = ListAllHelpFiles()
  excludeFnames = []
  for (desc, fname) in firstList:
   if (desc in excludeList):
    excludeFnames.append(fname)
  helpDescs = []
  for (desc, fname) in firstList:
   if (fname not in excludeFnames):
    helpIDMap[cmdID] = (desc, fname)
    win32ui.GetMainFrame().HookCommand(HandleHelpOtherCommand, cmdID)
    cmdID = (cmdID + 1)
 helpMenu = mainMenu.GetSubMenu((mainMenu.GetMenuItemCount() - 1))
 otherHelpMenuPos = 2
 otherMenu = helpMenu.GetSubMenu(otherHelpMenuPos)
 while otherMenu.GetMenuItemCount():
  otherMenu.DeleteMenu(0, win32con.MF_BYPOSITION)
 if helpIDMap:
  for (id, (desc, fname)) in helpIDMap.iteritems():
   otherMenu.AppendMenu((win32con.MF_ENABLED | win32con.MF_STRING), id, desc)
 else:
  helpMenu.EnableMenuItem(otherHelpMenuPos, (win32con.MF_BYPOSITION | win32con.MF_GRAYED))

def SetHelpMenuOtherHelp ( mainMenu ) : global helpIDMap if ( helpIDMap is None ) : helpIDMap = { } cmdID = win32ui . ID_HELP_OTHER excludeList = [ 'Main Python Documentation' , 'Pythonwin Reference' ] firstList = ListAllHelpFiles ( ) excludeFnames = [ ] for ( desc , fname ) in firstList : if ( desc in excludeList ) : excludeFnames . append ( fname ) helpDescs = [ ] for ( desc , fname ) in firstList : if ( fname not in excludeFnames ) : helpIDMap [ cmdID ] = ( desc , fname ) win32ui . GetMainFrame ( ) . HookCommand ( HandleHelpOtherCommand , cmdID ) cmdID = ( cmdID + 1 ) helpMenu = mainMenu . GetSubMenu ( ( mainMenu . GetMenuItemCount ( ) - 1 ) ) otherHelpMenuPos = 2 otherMenu = helpMenu . GetSubMenu ( otherHelpMenuPos ) while otherMenu . GetMenuItemCount ( ) : otherMenu . DeleteMenu ( 0 , win32con . MF_BYPOSITION ) if helpIDMap : for ( id , ( desc , fname ) ) in helpIDMap . iteritems ( ) : otherMenu . AppendMenu ( ( win32con . MF_ENABLED | win32con . MF_STRING ) , id , desc ) else : helpMenu . EnableMenuItem ( otherHelpMenuPos , ( win32con . MF_BYPOSITION | win32con . MF_GRAYED ) )
modifies the main help menu to handle all registered help files .