twisted.words.protocols.irc.assembleFormattedText(formatted)
function documentationtwisted.words.protocols.irc
View Source
Assemble formatted text from structured information.
Currently handled formatting includes: bold, reverse, underline, mIRC color codes and the ability to remove all current formatting.
It is worth noting that assembled text will always begin with the control code to disable other attributes for the sake of correctness.
For example:
from twisted.words.protocols.irc import attributes as A assembleFormattedText( A.normal[A.bold['Time: '], A.fg.lightRed['Now!']])
Would produce "Time: " in bold formatting, followed by "Now!" with a foreground color of light red and without any additional formatting.
Available attributes are:
Available colors are:
Parameters | formatted | Structured text and attributes. |
Returns | String containing mIRC control sequences that mimic those specified by
formatted. (type: str ) | |
See Also | http://www.mirc.co.uk/help/color.txt | |
Present Since | 13.1 |