courseall.py

来自「python web programming 部分」· Python 代码 · 共 27 行

PY
27
字号
#
# $Workfile: CourseAll.py $ $Revision: 2 $
# $Date: 9/12/01 1:01p $ $Author: Sholden $
#
import Courses


class Page(Courses.Page):

    def Body(self):
        result = ["""<H3>PythonTeach Course Offerings</H3>
        <P>This lists all our current classes. Please click on the course title
        for more information.</P><TABLE>"""]
        crslst = Courses.qCrss()
        for c in crslst:
            a = Courses.qIns(c.CrsAuthor)[0]
            result.append("""
    <TR><TD VALIGN="TOP">%d</TD>
        <TD VALIGN="TOP"><A HREF="/Course/%d/">%s</A><BR>
                <FONT SIZE="-2"><i>by</I> <A HREF="/Instructor/%d/">%s</A></FONT></TD>
        <TD VALIGN="TOP">$%d</TD>
    </TR>""" % (c.CrsNum, c.CrsNum, c.CrsTitle, c.CrsAuthor, a.InsName, c.CrsPrice))
        result.append("</TABLE>")
        return "\r\n".join(result)


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?