upperclasstwitoftheyearservlet.py

来自「freemaker安装软件」· Python 代码 · 共 14 行

PY
14
字号
from freemarker.ext import servlet

class UpperClassTwitOfTheYearServlet(servlet.FreemarkerServlet):
    def initializeServletContext(self, request, response):
        twits = {'Vivian Smith-Smythe-Smith of Kensington' : ('O-level in chemo-hygiene', 'shooting himself', 'runner up'), \
                 'Simon Zinc-Trumpet-Harris': ('married to a very attractive table lamp', 'being shot by Nigel', 'not known'), \
                 'Nigel Incubator-Jones of Henley': ('his best friend is a tree and in his spare time he \'s a stockbroker', 'shooting himself', 'third place'), \
                 'Gervaise Brook-Hampster of Kensington and Weybridge': ('is in the Guards and his father uses him as a wastebasket', 'shooting himself', 'winner'), \
                 'Oliver St John Mollusc': ('Harrow and the Guards, thought by many to be this year\'s outstanding twit', 'running himself over with a car', 'not known') \
                }
        self.servletContext.setAttribute('twits', twits)


⌨️ 快捷键说明

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