wcwidth API reference
59 public APIs from wcwidth (jquast/wcwidth) — 17 classes, 20 functions, 22 methods. Signatures extracted by static analysis of the actual source.
Repository: jquast/wcwidth
| Kind | Count |
|---|---|
| Classes | 17 |
| Functions | 20 |
| Methods | 22 |
API list
class
bin.update-tables.GraphemeRegistryRenderCtxRender context for the grapheme override hash registry.
class
bin.update-tables.GraphemeTableRenderCtxRender context for grapheme tables (latest version only).
class
bin.update-tables.MergedOverridesCategoryA single category within the merged overrides table.
class
bin.update-tables.RenderDefinitionBase class, do not instantiate it directly.
method
bin.update-tables.RenderDefinition.generate() -> Iterator[str]Just like jinja2.Template.generate.
method
bin.update-tables.RenderDefinition.render() -> strJust like jinja2.Template.render.
class
bin.update-tables.TableEntryAn entry of a unicode table.
method
bin.update-tables.TableEntry.filter_by_category_width(wide:int) -> boolReturn whether entry matches displayed width.
class
bin.update-tables.TermProgramTableRenderCtxRender context for terminal program data.
class
bin.update-tables.UnicodeDataFileHelper class for fetching Unicode Data Files.
method
bin.update-tables.UnicodeDataFile.EmojiData(version:UnicodeVersion) -> strFetch emoji-data.txt for Extended_Pictographic property.
method
bin.update-tables.UnicodeDataFile.do_retrieve(url:str, fname:str) -> NoneRetrieve given url to target filepath fname.
method
bin.update-tables.UnicodeDataFile.do_retrieve_udhr_combined(url:str, fname:str) -> NoneFetch UDHR zip file, extract, and combine all translations.
class
bin.update-tables.UnicodeVersionA class for comparable unicode version.
method
bin.update-tables.UnicodeVersion.parse(version_str:str) -> UnicodeVersionParse a version string.
func
bin.update-tables.dedup_override_table(table:Mapping[str, TerminalOverrides]) -> DedupedOverridesDeduplicate override table by hashing.
func
bin.update-tables.fetch_all_data_files(fetch_all_versions:bool=False) -> NoneFetch all required Unicode data files.
func
bin.update-tables.main(only_fetch:bool=False, fetch_all_versions:bool=False, check_last_modified:bool=False) -> NoneUpdate east-asian, combining and zero width tables.
func
bin.update-tables.parse_args() -> dict[str, Any]Parse command-line arguments.
func
bin.update-tables.parse_category_ambiguous(fname:str) -> TableDefParse EastAsianWidth.txt for 'A' (Ambiguous) category.
func
bin.update-tables.parse_derived_core_property(fname:str, property_name:str) -> set[int]Parse DerivedCoreProperties.txt for a specific property.
func
bin.update-tables.parse_extended_pictographic(fname:str) -> TableDefParse emoji-data.txt for Extended_Pictographic property.
func
bin.update-tables.parse_indic_syllabic_category(fname:str) -> dict[str, TableDef]Parse IndicSyllabicCategory.txt for Consonant property.
func
bin.update-tables.parse_unicode_table(file:Iterable[str]) -> Iterator[TableEntry]Parse unicode tables.
func
bin.update-tables.parse_wchar_codepoint(wchar:str) -> intExtract the primary codepoint from a wchar string.
func
bin.update-tables.values_to_hex_ranges(values:set[int]) -> list[tuple[str, str, str]]Convert a set of codepoint integers to hex range descriptions.
class
bin.wcwidth-browser.PagerA less(1)-like browser for browsing unicode characters.
method
bin.wcwidth-browser.Pager.on_resize(*args)Signal handler callback for SIGWINCH.
method
bin.wcwidth-browser.Pager.run(writer, reader)Pager entry point.
class
bin.wcwidth-browser.ScreenRepresents terminal style, data dimensions, and drawables.
method
bin.wcwidth-browser.Screen.head_item()Text of a single column heading.
method
bin.wcwidth-browser.Screen.hint_width()Width of a column segment.
method
bin.wcwidth-browser.Screen.num_columns()Number of columns displayed.
method
bin.wcwidth-browser.Screen.num_rows()Number of rows displayed.
method
bin.wcwidth-browser.Screen.row_begins()Top row displayed for content.
method
bin.wcwidth-browser.Screen.row_ends()Bottom of page.
class
bin.wcwidth-browser.StyleStyling decorator class instance for terminal output.
class
bin.wcwidth-browser.WcCombinedCharacterGeneratorGenerator yields unicode characters with combining.
func
bin.wcwidth-browser.main(opts)Program entry point.
func
bin.wcwidth-browser.readline(term, width)A rudimentary readline implementation.
func
bin.wcwidth-libc-comparator.main(using_locale=('en_US', 'UTF-8'))Program entry point.
class
wcwidth._constants.TerminalOverridesPre-merged override range tuples for a single terminal.
func
wcwidth._constants.resolve_terminal(term_program:bool | str=False) -> str | NoneResolve a terminal identifier to its canonical name.
func
wcwidth.bisearch.bisearch(ucs:int, table:tuple[tuple[int, int], ...]) -> intBinary search in interval table.
func
wcwidth.escape_sequences.strip_sequences(text:str) -> strReturn text with all terminal escape sequences removed.
class
wcwidth.grapheme.BreakResultResult of grapheme cluster break decision.
class
wcwidth.grapheme.GCBGrapheme Cluster Break property values.
func
wcwidth.grapheme.grapheme_boundary_before(unistr:str, pos:int) -> intFind the grapheme cluster boundary immediately before a position.
class
wcwidth.hyperlink.HyperlinkA complete OSC 8 hyperlink with target and inner text.
method
wcwidth.hyperlink.Hyperlink.find_close(text:str, open_end:int) -> tuple[int, int]Find the matching OSC 8 close sequence.
method
wcwidth.hyperlink.Hyperlink.make_sequence() -> strRebuild the complete OSC 8 hyperlink escape sequence.
class
wcwidth.hyperlink.HyperlinkParamsParsed parameters from an OSC 8 hyperlink open sequence.
method
wcwidth.hyperlink.HyperlinkParams.make_close() -> strGenerate the OSC 8 close escape sequence.
method
wcwidth.hyperlink.HyperlinkParams.make_open() -> strGenerate the OSC 8 open escape sequence.
method
wcwidth.hyperlink.HyperlinkParams.parse(seq:str) -> HyperlinkParams | NoneParse an OSC 8 open sequence string.
func
wcwidth.sgr_state.propagate_sgr(lines:Sequence[str]) -> list[str]Propagate SGR codes across wrapped lines.
func
wcwidth.table_grapheme_overrides.get(term_canonical:str) -> dict[str, int]Return grapheme override dict for a terminal, or an empty dict.
method
wcwidth.text_sizing.TextSizingParams.from_params(raw:str, control_codes:str='parse') -> TextSizingParamsParse colon-separated ``key=value`` metadata string.
method
wcwidth.text_sizing.TextSizingParams.make_sequence() -> strBuild and return sub-part of an OSC 66 sequence.
About this data
These signatures were extracted from the public source of jquast/wcwidth
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.