[elbe-devel] [PATCH v2 02/13] Debianize - Edit widget factory
dion at linutronix.de
dion at linutronix.de
Thu Aug 1 17:49:23 CEST 2019
From: Olivier Dion <dion at linutronix.de>
This is a simple wrapper around urwid::Edit.
Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Bastian Germann <bage at linutronix.de>
---
elbepack/debianize/widgets/edit.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 elbepack/debianize/widgets/edit.py
diff --git a/elbepack/debianize/widgets/edit.py b/elbepack/debianize/widgets/edit.py
new file mode 100644
index 00000000..670098a5
--- /dev/null
+++ b/elbepack/debianize/widgets/edit.py
@@ -0,0 +1,14 @@
+# ELBE - Debian Based Embedded Rootfilesystem Builder
+# Copyright (c) 2019 Olivier Dion <dion at linutronix.de>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+
+import urwid
+
+
+def Edit(header='', default='', linebox=True, multiline=False):
+ this = urwid.Edit(("header", "{}\n".format(header)), default, multiline=multiline)
+ if linebox:
+ this = urwid.LineBox(this)
+ return this
--
2.11.0
More information about the elbe-devel
mailing list