GMime.TextPart

g GMime.Object GMime.Object GMime.Part GMime.Part GMime.Object->GMime.Part GMime.TextPart GMime.TextPart GMime.Part->GMime.TextPart GObject.Object GObject.Object GObject.Object->GMime.Object

Subclasses:

None

Methods

Inherited:

GMime.Part (25), GMime.Object (29), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_with_subtype (subtype)

get_charset ()

get_text ()

set_charset (charset)

set_text (text)

Virtual Methods

Inherited:

GMime.Part (1), GMime.Object (8), GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_object

GMime.Part

r

parent GMime.Part

Class Details

class GMime.TextPart(**kwargs)
Bases:

GMime.Part

Abstract:

No

Structure:

GMime.TextPartClass

A text MIME part object.

classmethod new()
Returns:

an empty MIME Part object with a default content-type of text/plain.

Return type:

GMime.TextPart

Creates a new text MIME part object with a default content-type of text/plain.

classmethod new_with_subtype(subtype)
Parameters:

subtype (str) – textual subtype string

Returns:

an empty text MIME part object with the specified subtype.

Return type:

GMime.TextPart

Creates a new text MIME part with a sepcified subtype.

get_charset()
Returns:

the value of the charset parameter or None if unavailable.

Return type:

str

Gets the value of the charset parameter on the Content-Type header.

get_text()
Returns:

a newly allocated string containing the utf-8 encoded text content.

Return type:

str

Gets the text content of the self as a string.

set_charset(charset)
Parameters:

charset (str) – the name of the charset

Sets the charset parameter on the Content-Type header to the specified value.

set_text(text)
Parameters:

text (str) – the text in utf-8

Sets the specified text as the content and updates the charset parameter on the Content-Type header.