MCPcopy Create free account
hub / github.com/scanny/python-pptx / new

Method new

src/pptx/parts/slide.py:162–169  ·  view source on GitHub ↗

Return newly-created blank slide part. The new slide-part has `partname` and a relationship to `slide_layout_part`.

(cls, partname, package, slide_layout_part)

Source from the content-addressed store, hash-verified

160
161 @classmethod
162 def new(cls, partname, package, slide_layout_part):
163 """Return newly-created blank slide part.
164
165 The new slide-part has `partname` and a relationship to `slide_layout_part`.
166 """
167 slide_part = cls(partname, CT.PML_SLIDE, package, CT_Slide.new())
168 slide_part.relate_to(slide_layout_part, RT.SLIDE_LAYOUT)
169 return slide_part
170
171 def add_chart_part(self, chart_type: XL_CHART_TYPE, chart_data: ChartData):
172 """Return str rId of new |ChartPart| object containing chart of `chart_type`.

Callers 3

_add_notes_slide_partMethod · 0.45
add_chart_partMethod · 0.45
_add_notes_slide_partMethod · 0.45

Calls 1

relate_toMethod · 0.80

Tested by

no test coverage detected