#NEWLINE# def InsertWxPage( self , index , page ) : #NEWLINE# #INDENT# ' Insert a wxPage instance into the notebook.\n\n        This should be used in favor of InsertPage for inserting a\n        wxPage instance into the notebook, as it takes into account the\n        current page state.\n\n        Parameters\n        ----------\n        index : int\n            The index at which to insert the page.\n\n        page : wxPage\n            The wxPage instance to add to the notebook.\n\n        ' #NEWLINE# if page . IsOpen ( ) : #NEWLINE# #INDENT# index = min ( index , self . GetPageCount ( ) ) #NEWLINE# self . InsertPage ( index , page , page . GetTitle ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# page . Show ( False ) #NEWLINE# self . _hidden_pages [ page ] = index