#!/usr/bin/python import cgi import cgitb cgitb.enable() storage = open("downloads.txt", 'a+') storage.write(str(1)) storage.close() print("Content-Type: text/html\n\n") with open("download.html", 'r+') as downloads: for line in downloads.readlines(): print(line)