All pastes #983586 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-04-13 13:54 UTC
rendered paste body
# Get current page
currentPage = os.environ.get('PATH_INFO', '')

# Navigation String
string = '''
<ul>
<li><a href="/a.py">page </a></li>
<li><a href="/b.py">page b</a></li>
<li><a href="/c.py">page c</a></li>
<li><a href="/d.py">page d</a></li>
<li><a href="/e.py">page e</a></li>
</ul>
'''

# Function to find which line has currentPage in it and insert 'class="hover"' following href=currentPage