# Get current page currentPage = os.environ.get('PATH_INFO', '') # Navigation String string = ''' ''' # Function to find which line has currentPage in it and insert 'class="hover"' following href=currentPage