#!/usr/bin/python3 import os import sys import rlgalldb as rlgall playerdir = "/var/www/lighttpd/scoring/players/" linkstr = '
  • {0}
  • \n' filelist = os.listdir(playerdir) namelist = [] for filename in filelist: if filename.endswith(".html"): namelist.append(filename.rsplit(".html", 1)[0]) namelist.sort() sys.stdout.write("Content-Type: text/html; charset=utf-8\r\n\r\n") sys.stdout.write(rlgall.phead.format("Players")) sys.stdout.write(rlgall.ptop) sys.stdout.write(rlgall.navscore.format("Players")) sys.stdout.write(rlgall.pti.format("Players")) if not namelist: sys.stdout.write("

    No one is here.

    \n") else: sys.stdout.write("\n") sys.stdout.write(rlgall.pend)