def setup_index(page_info):
 if (page_info.basename == u''):
  index_txt_path = os.path.join(page_info.basepath, u'index.txt')
  if os.path.exists(index_txt_path):
   page_info.index = open(index_txt_path, u'r').read().splitlines()

def setup_index ( page_info ) : if ( page_info . basename == u'' ) : index_txt_path = os . path . join ( page_info . basepath , u'index.txt' ) if os . path . exists ( index_txt_path ) : page_info . index = open ( index_txt_path , u'r' ) . read ( ) . splitlines ( )
build page sequence from index .