| Trees | Indices | Help |
|
|---|
unicode
'iso-8859-15')charset parameter.
source code
'',
out=None,
ambiwidth=None)data as a table in the terminal.
source code
'',
subsequent_indent='',
linesep='\n',
ambiwidth=1)t, which contains unicode characters.
source code
u' ',
remove=u'')'%.1f')
source code
'\r\n'
u''
'trac.util'
u'
'
8233
Imports: __builtin__, locale, os, re, sys, textwrap, quote, quote_plus, unquote, east_asian_width, _, ctypes
Convert input to an unicode object.
For a str object, we'll first try to decode the bytes using the given
charset encoding (or UTF-8 if none is specified), then we fall back to
the latin1 encoding which might be correct or not, but at least preserves
the original byte sequence by mapping each byte to the corresponding
unicode code point in the range U+0000 to U+00FF.
Otherwise, a simple unicode() conversion is attempted, with some special
care taken for Exception objects.
'/')
urllib.quote
value - anything that converts to a str. If unicode
input is given, it will be UTF-8 encoded.safe - as in quote, the characters that would otherwise be
quoted but shouldn't here (defaults to '/')'')
urllib.quote_plus.
value - anything that converts to a str. If unicode
input is given, it will be UTF-8 encoded.safe - as in quote_plus, the characters that would
otherwise be quoted but shouldn't here (defaults to
'/')urllib.unquote.
str - UTF-8 encoded str value (for example, as obtained by
unicode_quote).unicode'')
A unicode aware version of urllib.urlencode.
Values set to empty are converted to the key alone, without the equal sign.
'iso-8859-15')
Convert a string to UTF-8, assuming the encoding is either UTF-8, ISO
Latin-1, or as specified by the optional charset parameter.
''Deprecated in 0.10. You should use unicode strings only.''
Return the encoding, which is retrieved on ahead, according to user preference.
We should use this instead of locale.getpreferredencoding() which
is not thread-safe.
Determine the column width of text in Unicode characters.
The characters in the East Asian Fullwidth (F) or East Asian Wide (W) have a column width of 2. The other characters in the East Asian Halfwidth (H) or East Asian Narrow (Na) have a column width of 1.
That ambiwidth parameter is used for the column width of the East
Asian Ambiguous (A). If 1, the same width as characters in US-ASCII.
This is expected by most users. If 2, twice the width of US-ASCII
characters. This is expected by CJK users.
'',
out=None,
ambiwidth=None)
Print data as a table in the terminal.
That ambiwidth parameter is used for the column width of the East
Asian Ambiguous (A). If None, detect ambiwidth with the locale settings.
If others, pass to the ambiwidth parameter of text_width.
'',
subsequent_indent='',
linesep='\n',
ambiwidth=1)
Wraps the single paragraph in t, which contains unicode characters.
The every line is at most cols characters long.
That ambiwidth parameter is used for the column width of the East
Asian Ambiguous (A). If 1, the same width as characters in US-ASCII.
This is expected by most users. If 2, twice the width of US-ASCII
characters. This is expected by CJK users.
Safe conversion of text to base64 representation using utf-8 bytes.
Strips newlines from output unless strip_newlines is False.
| Trees | Indices | Help |
|
|---|