Playing with layouts, placeholders, and textboxes
Now, let's move on to do some interesting operations on PPTs. Importantly, we'll discuss operations that are most frequently used.
No specific modules are required for this recipe; we would use the
python-pptx module that was installed for the earlier recipes. In this recipe, we will work with different slide layouts and play with shapes and text.
How to do it...
- Let's go further and use a different type of slide layout, along with bulleted content in it. The following code snippet does what we need:
from pptx import Presentation prs = Presentation() two_content_slide_layout = prs.slide_layouts slide = prs.slides.add_slide(two_content_slide_layout) shapes = slide.shapes title_shape ...