parameters: (self, page_name)
docstring: Add a new page with the name given in page_name.
docstring_summary: Add a new page with the name given in page_name.
docstring_tokens: Add a new page with the name given in page_name .
function: def add_page(self, page_name):
          """Add a new page with the name given in page_name."""
          if not page_name:
              raise InvalidNameError("Invalid TabPage name: '%s'" % page_name)
          if page_name in self.pages:
              raise AlreadyExistsError(
                  "TabPage named '%s' already exists" % page_name)
  
          self.pages[page_name] = self.page_class(self.pages_frame)
          self._pages_order.append(page_name)
          self._tab_set.add_tab(page_name)
  
          if len(self.pages) == 1: # adding first page
              self._default_page = page_name
              self.change_page(page_name)
function_tokens: def add_page ( self , page_name ) : if not page_name : raise InvalidNameError ( "Invalid TabPage name: '%s'" % page_name ) if page_name in self . pages : raise AlreadyExistsError ( "TabPage named '%s' already exists" % page_name ) self . pages [ page_name ] = self . page_class ( self . pages_frame ) self . _pages_order . append ( page_name ) self . _tab_set . add_tab ( page_name ) if len ( self . pages ) == 1 : # adding first page self . _default_page = page_name self . change_page ( page_name )