import os,sys def refresh(): sys.stdout=open("index.htm","w",-1,"utf8") print("") print("") def walk_dir(cur_path): print(""+cur_path+"") exist=False for name in os.listdir(cur_path): exist=True next_path=os.path.join(cur_path,name) if os.path.isdir(next_path): print("") else: print("
  • "+name+"
  • ") if not exist: print("
  • (Empty)
  • ") walk_dir(".\\") print("") if __name__=="__main__": refresh()