本文整理汇总了Python中pycalendar.icalendar.calendar.Calendar.setPRODID方法的典型用法代码示例。如果您正苦于以下问题:Python Calendar.setPRODID方法的具体用法?Python Calendar.setPRODID怎么用?Python Calendar.setPRODID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pycalendar.icalendar.calendar.Calendar
的用法示例。
在下文中一共展示了Calendar.setPRODID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from pycalendar.icalendar.calendar import Calendar [as 别名]
# 或者: from pycalendar.icalendar.calendar.Calendar import setPRODID [as 别名]
import twistedcaldav.customxml
import twistedcaldav.timezonexml
twistedcaldav # Shhh.. pyflakes
#
# DefaultHTTPHandler
#
from txweb2.http_headers import DefaultHTTPHandler, last, singleHeader
DefaultHTTPHandler.updateParsers({
"If-Schedule-Tag-Match": (last, str),
})
DefaultHTTPHandler.updateGenerators({
"Schedule-Tag": (str, singleHeader),
})
# Do some PyCalendar init
from pycalendar.icalendar.calendar import Calendar
from pycalendar.icalendar.property import Property
from pycalendar.vcard.card import Card
from pycalendar.value import Value
Calendar.setPRODID("-//CALENDARSERVER.ORG//NONSGML Version 1//EN")
Card.setPRODID("-//CALENDARSERVER.ORG//NONSGML Version 1//EN")
# These are properties we use directly and we want the default value type set for TEXT
Property.registerDefaultValue("X-CALENDARSERVER-PRIVATE-COMMENT", Value.VALUETYPE_TEXT)
Property.registerDefaultValue("X-CALENDARSERVER-ATTENDEE-COMMENT", Value.VALUETYPE_TEXT)