def addSubmenus(menu, pluginFileName, pluginFolderPath, pluginPath):
 submenu = settings.Tkinter.Menu(menu, tearoff=0)
 menu.add_cascade(label=pluginFileName.capitalize(), menu=submenu)
 settings.ToolDialog().addPluginToMenu(submenu, pluginPath)
 submenu.add_separator()
 submenuFileNames = archive.getPluginFileNamesFromDirectoryPath(pluginFolderPath)
 for submenuFileName in submenuFileNames:
  settings.ToolDialog().addPluginToMenu(submenu, os.path.join(pluginFolderPath, submenuFileName))

def addSubmenus ( menu , pluginFileName , pluginFolderPath , pluginPath ) : submenu = settings . Tkinter . Menu ( menu , tearoff = 0 ) menu . add_cascade ( label = pluginFileName . capitalize ( ) , menu = submenu ) settings . ToolDialog ( ) . addPluginToMenu ( submenu , pluginPath ) submenu . add_separator ( ) submenuFileNames = archive . getPluginFileNamesFromDirectoryPath ( pluginFolderPath ) for submenuFileName in submenuFileNames : settings . ToolDialog ( ) . addPluginToMenu ( submenu , os . path . join ( pluginFolderPath , submenuFileName ) )
add a tool plugin menu .