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

Method _set_element_text

src/pptx/oxml/coreprops.py:273–280  ·  view source on GitHub ↗

Set string value of `name` property to `value`.

(self, prop_name: str, value: str)

Source from the content-addressed store, hash-verified

271 del self.attrib[qn("xsi:foo")]
272
273 def _set_element_text(self, prop_name: str, value: str) -> None:
274 """Set string value of `name` property to `value`."""
275 value = str(value)
276 if len(value) > 255:
277 tmpl = "exceeded 255 char limit for property, got:\n\n'%s'"
278 raise ValueError(tmpl % value)
279 element = self._get_or_add(prop_name)
280 element.text = value
281
282 def _text_of_element(self, property_name: str) -> str:
283 element = getattr(self, property_name)

Callers 11

author_textMethod · 0.95
category_textMethod · 0.95
comments_textMethod · 0.95
contentStatus_textMethod · 0.95
identifier_textMethod · 0.95
keywords_textMethod · 0.95
language_textMethod · 0.95
lastModifiedBy_textMethod · 0.95
subject_textMethod · 0.95
title_textMethod · 0.95
version_textMethod · 0.95

Calls 1

_get_or_addMethod · 0.95

Tested by

no test coverage detected