Base (Private) Module: objects/_textobject.py

Purpose:

This module provides the implementation for the TextObject object.

Platform:

Linux/Windows | Python 3.10+

Developer:

J Berendt

Email:

development@s3dev.uk

Comments:

n/a

class TextObject(content: str)[source]

Bases: object

This class provides the implementation for the TextObject.

For each page (or slide) in a document, an instance of this class is created, populated and appended into the page’s texts list attribute.

Parameters:

content (str) – Page content as a single string.

Note

No string cleaning is performed by this class. The string contained in the contents attribute is stored exactly as extracted from the page or slide’s text object.

property content: str

Accessor to the textual content.

property hastext: bool

Flag indicating if the content attribute is populated.