Mistři v programování na #hovnokod

Python #404

import cgi
import MySQLdb
 
MyDB=MySQLdb.connect(host='localhost', user='root', passwd='', db='serv')
cursor=MyDB.cursor()
cursor.execute("""SELECT * FROM IndexPage WHERE id=2""")
zg1=cursor.fetchall()
zp=cgi.FieldStorage()
p=zp.has_key('pages')
lixt='lrof'
title='{TITLE}'
Block1='{BLOCK_1}'
 
if p==1:
    print 'Content-Type: text/html\n'
    sh=open(r'themplates/sh2')
    res=sh.read()
    ...

HovnoKod,