def setDateTimeTriggers(self, dateTimeList): if not isinstance(dateTimeList, list) or len(dateTimeList) == 0: raise TypeError( "A list with at least 1 datetime object is expected.") assert_arg_list_type(dateTimeList, datetime) self.dateTimeTriggers = map(lambda x: x.strftime("%Y-%m-%d %H:%M:%S"), dateTimeList)
def setPoints(self, *points): print points assert_arg_list_type(points, Point2D) if (type == self.TYPE_CIRCLE) and (len(points) != 3): raise TypeError(self.TYPE_CIRCLE + ' requires exactly 3 points.') elif (type == self.TYPE_POLYGON) and (len(points) < 2): raise TypeError(self.TYPE_POLYGON + ' requires at least 2 points.') else: self.points = points
def setDateTimeTriggers(self, dateTimeList): if not isinstance(dateTimeList, list) or len(dateTimeList) == 0: raise TypeError("A list with at least 1 datetime object is expected.") assert_arg_list_type(dateTimeList, datetime) self.dateTimeTriggers = map(lambda x : x.strftime("%Y-%m-%d %H:%M:%S"), dateTimeList)