#file testpso/general.py import time from pso.parser import Tag class Time(Tag): """ show a fortune cookie message""" def __call__(self, handler, cdata=''): import os return """
%s""" % time.ctime() class Message(Tag): """ if message in scrap show it and erase it""" def __call__(self, handler, cdata=''): if handler.scratch().has_key('message'): message = handler.scratch()['message'] del handler.scratch()['message'] return message return cdata