Galaxie Shell 0.2.6 documentation


Navigation:   | Index   | Search   | Top   | Up   | Prev   | Next   |
Table of Content: |glxshell.glxush module |TextWrapper |TextWrapper.fill() |TextWrapper.sentence_end_re |TextWrapper.unicode_whitespace_trans |TextWrapper.uspace |TextWrapper.wordsep_re |TextWrapper.wordsep_simple_re |TextWrapper.wrap() |TextWrapper.x |dedent() |fill() |indent() |shorten() |wrap() |

© Copyright 2020-2024, Galaxie Shell Team.

Top » glxshell » glxshell package » glxshell.glxush module

glxshell.glxush module

class glxshell.glxush.TextWrapper(width=None, initial_indent='', subsequent_indent='', expand_tabs=True, replace_whitespace=True, fix_sentence_endings=False, break_long_words=True, drop_whitespace=True, break_on_hyphens=True, tabsize=8, *, max_lines=None, placeholder=' [...]')[source]

Bases: object

fill(text)[source]
sentence_end_re = re.compile('[a-z][\\.\\!\\?][\\"\\\']?\\Z')
unicode_whitespace_trans = {9: 32, 10: 32, 11: 32, 12: 32, 13: 32, 32: 32}
uspace = 32
wordsep_re = re.compile('(\\s+|[^\\s\\w]*\\w+[^0-9\\W]-(?=\\w+[^0-9\\W])|(?<=[\\w\\!\\"\\\'\\&\\.\\,\\?])-{2,}(?=\\w))')
wordsep_simple_re = re.compile('(\\s+)')
wrap(text)[source]
x = ' '
glxshell.glxush.dedent(text)[source]
glxshell.glxush.fill(text, width=70, **kwargs)[source]
glxshell.glxush.indent(text, prefix, predicate=None)[source]
glxshell.glxush.shorten(text, width, **kwargs)[source]
glxshell.glxush.wrap(text, width=None, **kwargs)[source]

Top » glxshell » glxshell package » glxshell.glxush module

© Copyright 2020-2024, Galaxie Shell Team.
This page is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License (CC BY-NC-SA 4.0).
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

Last updated on None.
Created using Sphinx 8.0.2.