Text API

API for working with the Text type.

Import this module like this:

from sympathy.api import text

Class text.File

class sympathy.typeutils.text.File(fileobj=None, data=None, filename=None, mode='r', scheme='hdf5', source=None, managed=False, import_links=False)[source]

A Text type containing arbitrary text, be it Hamlet or some json encoded data structure.

Any node port with the Text type will produce an object of this kind.

get()[source]

Return text data.

classmethod icon()[source]

Return full path to svg icon.

names(kind=None, **kwargs)[source]

Return a formatted list with a name and type of the data. columns.

set(text_data)[source]

Set text data.

source(other, shallow=False)[source]

Copy the contents from other text.File. Equivalent to update().

types(kind=None, **kwargs)[source]

Return types associated with names.

update(other)[source]

Copy the contents from other text.File. Equivalent to source().

classmethod viewer()[source]

Return viewer class, which must be a subclass of sympathy.api.typeutil.ViewerBase