urwid 2.6.0.post0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of urwid might be problematic. Click here for more details.

Files changed (75) hide show
  1. urwid/__init__.py +333 -0
  2. urwid/canvas.py +1413 -0
  3. urwid/command_map.py +137 -0
  4. urwid/container.py +59 -0
  5. urwid/decoration.py +65 -0
  6. urwid/display/__init__.py +97 -0
  7. urwid/display/_posix_raw_display.py +413 -0
  8. urwid/display/_raw_display_base.py +914 -0
  9. urwid/display/_web.css +12 -0
  10. urwid/display/_web.js +462 -0
  11. urwid/display/_win32.py +171 -0
  12. urwid/display/_win32_raw_display.py +269 -0
  13. urwid/display/common.py +1219 -0
  14. urwid/display/curses.py +690 -0
  15. urwid/display/escape.py +624 -0
  16. urwid/display/html_fragment.py +251 -0
  17. urwid/display/lcd.py +518 -0
  18. urwid/display/raw.py +37 -0
  19. urwid/display/web.py +636 -0
  20. urwid/event_loop/__init__.py +55 -0
  21. urwid/event_loop/abstract_loop.py +175 -0
  22. urwid/event_loop/asyncio_loop.py +231 -0
  23. urwid/event_loop/glib_loop.py +294 -0
  24. urwid/event_loop/main_loop.py +721 -0
  25. urwid/event_loop/select_loop.py +230 -0
  26. urwid/event_loop/tornado_loop.py +206 -0
  27. urwid/event_loop/trio_loop.py +302 -0
  28. urwid/event_loop/twisted_loop.py +269 -0
  29. urwid/event_loop/zmq_loop.py +275 -0
  30. urwid/font.py +695 -0
  31. urwid/graphics.py +96 -0
  32. urwid/highlight.css +19 -0
  33. urwid/listbox.py +1899 -0
  34. urwid/monitored_list.py +522 -0
  35. urwid/numedit.py +376 -0
  36. urwid/signals.py +330 -0
  37. urwid/split_repr.py +130 -0
  38. urwid/str_util.py +358 -0
  39. urwid/text_layout.py +632 -0
  40. urwid/treetools.py +515 -0
  41. urwid/util.py +557 -0
  42. urwid/version.py +16 -0
  43. urwid/vterm.py +1806 -0
  44. urwid/widget/__init__.py +181 -0
  45. urwid/widget/attr_map.py +161 -0
  46. urwid/widget/attr_wrap.py +140 -0
  47. urwid/widget/bar_graph.py +649 -0
  48. urwid/widget/big_text.py +77 -0
  49. urwid/widget/box_adapter.py +126 -0
  50. urwid/widget/columns.py +1145 -0
  51. urwid/widget/constants.py +574 -0
  52. urwid/widget/container.py +227 -0
  53. urwid/widget/divider.py +110 -0
  54. urwid/widget/edit.py +718 -0
  55. urwid/widget/filler.py +403 -0
  56. urwid/widget/frame.py +539 -0
  57. urwid/widget/grid_flow.py +539 -0
  58. urwid/widget/line_box.py +194 -0
  59. urwid/widget/overlay.py +829 -0
  60. urwid/widget/padding.py +597 -0
  61. urwid/widget/pile.py +971 -0
  62. urwid/widget/popup.py +170 -0
  63. urwid/widget/progress_bar.py +141 -0
  64. urwid/widget/scrollable.py +597 -0
  65. urwid/widget/solid_fill.py +44 -0
  66. urwid/widget/text.py +354 -0
  67. urwid/widget/widget.py +852 -0
  68. urwid/widget/widget_decoration.py +166 -0
  69. urwid/widget/wimp.py +792 -0
  70. urwid/wimp.py +23 -0
  71. urwid-2.6.0.post0.dist-info/COPYING +504 -0
  72. urwid-2.6.0.post0.dist-info/METADATA +332 -0
  73. urwid-2.6.0.post0.dist-info/RECORD +75 -0
  74. urwid-2.6.0.post0.dist-info/WHEEL +5 -0
  75. urwid-2.6.0.post0.dist-info/top_level.txt +1 -0
urwid/graphics.py ADDED
@@ -0,0 +1,96 @@
1
+ # Urwid graphics widgets
2
+ # Copyright (C) 2004-2011 Ian Ward
3
+ #
4
+ # This library is free software; you can redistribute it and/or
5
+ # modify it under the terms of the GNU Lesser General Public
6
+ # License as published by the Free Software Foundation; either
7
+ # version 2.1 of the License, or (at your option) any later version.
8
+ #
9
+ # This library is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ # Lesser General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU Lesser General Public
15
+ # License along with this library; if not, write to the Free Software
16
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
+ #
18
+ # Urwid web site: https://urwid.org/
19
+
20
+
21
+ from __future__ import annotations
22
+
23
+ from urwid.display import AttrSpec
24
+ from urwid.widget import (
25
+ BarGraph,
26
+ BarGraphError,
27
+ BarGraphMeta,
28
+ BigText,
29
+ GraphVScale,
30
+ LineBox,
31
+ ProgressBar,
32
+ Sizing,
33
+ Text,
34
+ Widget,
35
+ fixed_size,
36
+ scale_bar_values,
37
+ )
38
+
39
+ __all__ = (
40
+ "BarGraph",
41
+ "BarGraphError",
42
+ "BarGraphMeta",
43
+ "BigText",
44
+ "GraphVScale",
45
+ "LineBox",
46
+ "ProgressBar",
47
+ "scale_bar_values",
48
+ )
49
+
50
+
51
+ class PythonLogo(Widget):
52
+ _sizing = frozenset([Sizing.FIXED])
53
+
54
+ def __init__(self) -> None:
55
+ """
56
+ Create canvas containing an ASCII version of the Python
57
+ Logo and store it.
58
+ """
59
+ super().__init__()
60
+ blu = AttrSpec("light blue", "default")
61
+ yel = AttrSpec("yellow", "default")
62
+ width = 17
63
+ # fmt: off
64
+ self._canvas = Text(
65
+ [
66
+ (blu, " ______\n"),
67
+ (blu, " _|_o__ |"), (yel, "__\n"),
68
+ (blu, " | _____|"), (yel, " |\n"),
69
+ (blu, " |__| "), (yel, "______|\n"),
70
+ (yel, " |____o_|"),
71
+ ]
72
+ ).render((width,))
73
+ # fmt: on
74
+
75
+ def pack(self, size=None, focus: bool = False):
76
+ """
77
+ Return the size from our pre-rendered canvas.
78
+ """
79
+ return self._canvas.cols(), self._canvas.rows()
80
+
81
+ def render(self, size, focus: bool = False):
82
+ """
83
+ Return the pre-rendered canvas.
84
+ """
85
+ fixed_size(size)
86
+ return self._canvas
87
+
88
+
89
+ def _test():
90
+ import doctest
91
+
92
+ doctest.testmod()
93
+
94
+
95
+ if __name__ == "__main__":
96
+ _test()
urwid/highlight.css ADDED
@@ -0,0 +1,19 @@
1
+ /* Style definition file generated by highlight 3.41, http://www.andre-simon.de/ */
2
+ /* highlight theme: Kwrite Editor */
3
+ body.hl { background-color:#e0eaee; }
4
+ pre.hl { color:#000000; background-color:#e0eaee; font-size:10pt; font-family:'Courier New',monospace;}
5
+ .hl.num { color:#b07e00; }
6
+ .hl.esc { color:#ff00ff; }
7
+ .hl.str { color:#bf0303; }
8
+ .hl.pps { color:#818100; }
9
+ .hl.slc { color:#838183; font-style:italic; }
10
+ .hl.com { color:#838183; font-style:italic; }
11
+ .hl.ppc { color:#008200; }
12
+ .hl.opt { color:#000000; }
13
+ .hl.ipl { color:#0057ae; }
14
+ .hl.lin { color:#555555; }
15
+ .hl.kwa { color:#000000; font-weight:bold; }
16
+ .hl.kwb { color:#0057ae; }
17
+ .hl.kwc { color:#000000; font-weight:bold; }
18
+ .hl.kwd { color:#010181; }
19
+