def listsubmenus(self, window_name, object_name):
menu_handle = self._get_menu_handle(window_name, object_name)<EOL>role, label = self._ldtpize_accessible(menu_handle)<EOL>menu_clicked = False<EOL>try:<EOL><INDENT>if not menu_handle.AXChildren:<EOL><INDENT>menu_clicked = True<EOL>try:<EOL><INDENT>menu_handle.Press()<EOL>self.wait(<NUM_LIT:1>)<EOL><DEDENT>except atomac._a11y.ErrorCannotComplete:<EOL><INDENT>pass<EOL><DEDENT>if not menu_handle.AXChildren:<EOL><INDENT>raise LdtpServerException(u"<STR_LIT>" %label)<EOL><DEDENT><DEDENT>children = menu_handle.AXChildren[<NUM_LIT:0>]<EOL>sub_menus = []<EOL>for current_menu in children.AXChildren:<EOL><INDENT>role, label = self._ldtpize_accessible(current_menu)<EOL>if not label:<EOL><INDENT>continue<EOL><DEDENT>sub_menus.append(u"<STR_LIT>" % (role, label))<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>if menu_clicked:<EOL><INDENT>menu_handle.Cancel()<EOL><DEDENT><DEDENT>return sub_menus<EOL>
List children of menu item

@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, either full name,
LDTP's name convention, or a Unix glob. Or menu heirarchy
@type object_name: string

@return: menu item in list on success.
@rtype: list