[elbe-devel] [PATCH 03/14] Debianize - Edit widget factory
Bastian Germann
bage at linutronix.de
Thu Aug 1 14:50:48 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
>
More information about the elbe-devel
mailing list