def print_directory():
 print
 print '<H3>Current Working Directory:</H3>'
 try:
  pwd = os.getcwd()
 except os.error as msg:
  print 'os.error:', escape(str(msg))
 else:
  print escape(pwd)
 print

def print_directory ( ) : print print '<H3>Current Working Directory:</H3>' try : pwd = os . getcwd ( ) except os . error as msg : print 'os.error:' , escape ( str ( msg ) ) else : print escape ( pwd ) print
dump the current directory as html .