CT_Slide
paper-pptx 0.2.0 API reference
p:sld element, root element of a slide part (XML document).
Attributes
bg
attributebgReturn p:bg grandchild or None if not present.
cSld
attributecSldCT_CommonSlideData= OneAndOnlyOne('p:cSld')clrMapOvr
attributeclrMapOvr= ZeroOrOne('p:clrMapOvr', successors=(_tag_seq[2:]))spTree
attributespTreeCT_GroupShapeReturn required p:cSld/p:spTree grandchild.
timing
attributetiming= ZeroOrOne('p:timing', successors=(_tag_seq[4:]))xml
attributexmlstrXML string for this element, suitable for testing purposes.
Pretty printed for readability and without an XML declaration at the top.
Functions
first_child_found_in
funcfirst_child_found_in(*tagnames: str) -> _Element | NoneFirst child with tag in tagnames, or None if not found.
paramtagnamesstr= ()Returns
lxml.etree._Element | Noneget_or_add_childTnLst
funcget_or_add_childTnLst()Return parent element for a new p:video child element.
The p:video element causes play controls to appear under a video
shape (pic shape containing video). There can be more than one video
shape on a slide, which causes the precondition to vary. It needs to
handle the case when there is no p:sld/p:timing element and when
that element already exists. If the case isn't simple, it just nukes
what's there and adds a fresh one. This could theoretically remove
desired existing timing information, but there isn't any evidence
available to me one way or the other, so I've taken the simple
approach.
insert_element_before
funcinsert_element_before(elm: ElementBase, *tagnames: str)paramelmElementBaseparamtagnamesstr= ()new
funcnew() -> CT_SlideReturn new p:sld element configured as base slide shape.
Returns
pptx.oxml.slide.CT_Slideremove_all
funcremove_all(*tagnames: str) -> NoneRemove child elements with tagname (e.g. "a:p") in tagnames.
paramtagnamesstr= ()Returns
Nonexpath
funcxpath(xpath_str: str) -> AnyOverride of lxml _Element.xpath() method.
Provides standard Open XML namespace mapping (nsmap) in centralized location.
paramxpath_strstrReturns
typing.Any