ui module (UI class)¶
Author: | Chris Warrick <chris@chriswarrick.com> |
---|---|
Copyright: | © 2011-2023, Chris Warrick. |
License: | BSD (see /LICENSE or Appendix B.) |
Date: | 2023-01-30 |
Version: | 4.3.2 |
New in version 3.0.0.
The User Interface.
Copyright: | © 2011-2023, Chris Warrick. |
---|---|
License: | BSD (see /LICENSE). |
-
pkgbuilder.ui.
get_termwidth
(default=None)[source]¶ Get the width of this terminal.
New in version 3.3.0.
Changed in version 4.2.9.
-
pkgbuilder.ui.
hanging_indent
(text, intro, termwidth=None, change_spaces=True, introwidth=None)[source]¶ Produce text with a hanging indent.
New in version 3.3.0.
Changed in version 4.0.0.
-
pkgbuilder.ui.
mlist
(items, sep=' ', change_spaces=True, termwidth=None, indentwidth=17)[source]¶ Output a list of strings, complete with a hanging indent.
New in version 3.3.0.
Changed in version 4.0.0.
-
class
pkgbuilder.ui.
Progress
(total=1)[source]¶ A static progress indicator with numbers.
Usage:
pm = Progress(total=2) pm.msg('Doing step 1...') step1() pm.msg('Doing step 2...') step2()