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

Method insert_element_before

src/pptx/oxml/xmlchemy.py:685–691  ·  view source on GitHub ↗
(self, elm: ElementBase, *tagnames: str)

Source from the content-addressed store, hash-verified

683 return None
684
685 def insert_element_before(self, elm: ElementBase, *tagnames: str):
686 successor = self.first_child_found_in(*tagnames)
687 if successor is not None:
688 successor.addprevious(elm)
689 else:
690 self.append(elm)
691 return elm
692
693 def remove_all(self, *tagnames: str) -> None:
694 """Remove child elements with tagname (e.g. "a:p") in `tagnames`."""

Callers 10

add_group_shapeMethod · 0.80
_insert_childMethod · 0.80
add_autoshapeMethod · 0.80
add_cxnSpMethod · 0.80
add_freeform_spMethod · 0.80
add_grpSpMethod · 0.80
add_picMethod · 0.80
add_placeholderMethod · 0.80
add_tableMethod · 0.80
add_textboxMethod · 0.80

Calls 2

first_child_found_inMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected