⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 html.py

📁 python web programming 部分
💻 PY
字号:
#
# $Workfile: HTML.py $ $Revision: 1 $
# $Date: 8/29/01 3:14p $ $Author: Sholden $
#
import Dept
import os

class Page(Dept.Page): # XXX Need a little more structure here?

    def Title(self):
        return "[Whoops, what do we return here?]"

    def Body(self):
            try:
                filepath = os.sep.join(self.path)
                f = open(filepath, "rb")
                img = f.read()
                return img
            except IOError:
                return """<B><I>This should be a 404 error.<BR>
                            Could not find file %s</I></B><BR>
                            Path is: %s""" % (filepath, self.path)



⌨️ 快捷键说明

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