Example #1
0
    def DictHeaderVisit(self, obj, topology_model):
        """
        Defined to generate header for  event python class.
        @parms obj: the instance of the event model to operation on.
        """

        for fname in list(self.__fp.keys()):
            c = EventHeader.EventHeader()
            d = datetime.datetime.now()
            c.date = d.strftime("%A, %d %B %Y")
            c.user = getuser()
            c.source = obj.get_xml_filename()
            self._writeTmpl(c, self.__fp[fname], "eventHeaderVisit")
Example #2
0
 def DictHeaderVisit(self, obj):
     """
     Defined to generate header for  event python class.
     @param obj: the instance of the event model to operation on.
     """
     inst = 0
     for id in obj.get_ids():
         c = EventHeader.EventHeader()
         d = datetime.datetime.now()
         c.date = d.strftime("%A, %d %B %Y")
         c.user = getuser()
         c.source = obj.get_xml_filename()
         self._writeTmpl(c, self.__fp[inst], "eventHeaderVisit")
         inst += 1