SlideLayouts
paper-pptx 0.2.0 API reference
Sequence of slide layouts belonging to a slide-master.
Supports indexed access, len(), iteration, index() and remove().
SlideLayouts(sldLayoutIdLst: CT_SlideLayoutIdList, parent: SlideMaster)Attributes
element
attributeelementThe lxml element proxied by this object.
parent
attributeparentThe ancestor proxy object to this one.
For example, the parent of a shape is generally the SlideShapes object that contains it.
part
attributepartSlideMasterPartFunctions
__getitem__
func__getitem__(idx: int) -> SlideLayoutProvides indexed access, e.g. slide_layouts[2].
paramidxintReturns
pptx.slide.SlideLayout__iter__
func__iter__() -> Iterator[SlideLayout]Generate each SlideLayout in the collection, in sequence.
Returns
typing.Iterator[pptx.slide.SlideLayout]__len__
func__len__() -> intSupport len() built-in function, e.g. len(slides) == 4.
Returns
intget_by_name
funcget_by_name(name: str, default: SlideLayout | None = None) -> SlideLayout | NoneReturn SlideLayout object having name, or default if not found.
paramnamestrparamdefaultSlideLayout | None= NoneReturns
pptx.slide.SlideLayout | Noneindex
funcindex(slide_layout: SlideLayout) -> intReturn zero-based index of slide_layout in this collection.
Raises ValueError if slide_layout is not present in this collection.
paramslide_layoutSlideLayoutReturns
intremove
funcremove(slide_layout: SlideLayout) -> NoneRemove slide_layout from the collection.
Raises ValueError when slide_layout is in use; a slide layout which is the basis for one
or more slides cannot be removed.
Refuses with TargetNotFoundError when the layout belongs to another presentation, and with UnsupportedStructureError when its part carries inbound relationships beyond this collection's own, where dropping it would strand whatever else points at it.
paramslide_layoutSlideLayoutReturns
None