## dirList.py
import os
"""
Author: Feihf
Date : 2014-5-30
"""
""" get Header """
def printHead():
print "<html>"
print "<head><style>a{border:1px solid #FF0099; font-size: 200%;}</style></head>"
print '<body style="background-color:rgb(200,237,204);">'
""" walk the certain dir,and process the dirname """
def printBody(dirname):
try:
ls=os.listdir(dirname)
except:
print('access deny')
else:
for file in ls:
if file == 'index.html':
continue
temp=os.path.join(dirname,file)
if(os.path.isdir(temp)):
print '<a style="background-color:pink;" href="./%s/">%s</a><a href="./%s/readMe.txt">[