safe.messaging.item.preformatted_text module

InaSAFE Disaster risk assessment tool developed by AusAid - Preformatted.

Contact :


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe.messaging.item.preformatted_text.PreformattedText(text, **kwargs)[source]

Bases: safe.messaging.item.text.Text

A representation for a preformatted text item.


Render as html <pre> element.

Returns:The html representation.
Return type:str

Render as plain text.

Parameters:text (str) – A string to add to the message.