From: Randy Dunlap <rdunlap@infradead.org>
To: Ulf Magnusson <ulfalizer@gmail.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [ANNOUNCE] Kconfiglib menuconfig implementation
Date: Thu, 3 May 2018 13:28:07 -0700 [thread overview]
Message-ID: <3d9be2f2-3fbe-411b-8529-0e0847f01346@infradead.org> (raw)
In-Reply-To: <CAFkk2KRvSxu+x-nb045=3L63KEk5h9URr5QYLPoYp6rqqTR4qA@mail.gmail.com>
On 05/01/2018 02:07 PM, Ulf Magnusson wrote:
> On Tue, May 1, 2018 at 9:47 PM, Ulf Magnusson <ulfalizer@gmail.com> wrote:
>> On Tue, May 1, 2018 at 9:12 PM, Ulf Magnusson <ulfalizer@gmail.com> wrote:
>>> On Tue, May 1, 2018 at 7:56 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
>>>> On 04/30/2018 05:57 PM, Ulf Magnusson wrote:
>>>>> Hello,
>>>>>
>>>>> Kconfiglib (https://github.com/ulfalizer/Kconfiglib) now has a
>>>>> terminal menuconfig implementation, implemented in plain curses
>>>>> (which is in the Python standard library).
>>>>>
>>>>> The interface should feel familiar to people used to mconf. It has
>>>>> some features that mconf lacks:
>>>>>
>>>>> - Seamless resizing
>>>>>
>>>>> - Unicode support
>>>>>
>>>>> - Runs on Windows (via 'pip install windows-curses', which uses
>>>>> PDCurses)
>>>>>
>>>>> - Improved information displays:
>>>>>
>>>>> * All expressions are split into readable chunks
>>>>>
>>>>> * Menus and comments have information displays
>>>>>
>>>>> - Relatively easy-to-read and easy-to-tweak code.
>>>>>
>>>>> Kconfiglib automatically invalidates symbols as needed, and
>>>>> values can never get stale, which helps.
>>>>>
>>>>> Some upcoming features are mouse support and a search feature that
>>>>> can jump directly to the definition of a symbol. The jump-to feature
>>>>> will use a "show-all" mode in case the symbol isn't visible.
>>>>>
>>>>> See the Kconfiglib GitHub page for screenshots. The menuconfig
>>>>> implementation is at
>>>>> https://github.com/ulfalizer/Kconfiglib/blob/master/menuconfig.py.
>>>>> The docstring at the top has some more information.
>>>>
>>>> Hi,
>>>>
>>>> I'm probably missing some python additive (I hope it's that easy), but
>>>> menuconfig.py is not liking the "degree" symbol in drivers/net/can/peak_canfd/Kconfig:
>>>>
>>>> config CAN_PEAK_PCIEFD
>>>> depends on PCI
>>>> tristate "PEAK-System PCAN-PCIe FD cards"
>>>> ---help---
>>>> This driver adds support for the PEAK-System PCI Express FD
>>>> CAN-FD cards family.
>>>> These 1x or 2x CAN-FD channels cards offer CAN 2.0 a/b as well as
>>>> CAN-FD access to the CAN bus. Besides the nominal bitrate of up to
>>>> 1 Mbit/s, the data bytes of CAN-FD frames can be transmitted with
>>>> up to 12 Mbit/s. A galvanic isolation of the CAN ports protects the
>>>> electronics of the card and the respective computer against
>>>> disturbances of up to 500 Volts. The PCAN-PCI Express FD can be
>>>> operated with ambient temperatures in a range of -40 to +85 °C.
>>>>
>>>>
>>>> kconfiglib.KconfigSyntaxError:
>>>> Malformed ascii in drivers/net/can/peak_canfd/Kconfig
>>>> Context: b't temperatures in a range of -40 to +85 \xc2\xb0C.\n'
>>>> Problematic data: b'\xc2'
>>>> Reason: ordinal not in range(128)
>>>>
>>>>
>>>> thanks,
>>>> --
>>>> ~Randy
>>>
>>> Thanks for trying it out!
>>>
>>> You're probably running in the C locale, which implies an ASCII
>>> encoding. That has caused enough trouble that the Python devs decided
>>> to automatically convert it to UTF-8 in Python 3.7:
>>> https://www.python.org/dev/peps/pep-0538/. LC_CTYPE=C.UTF-8 should fix
>>> it.
>>>
>>> It's a bit silly to have it crash for something like that though. I
>>> could force UTF-8 instead of respecting the locale (though it feels
>>> neater to respect settings), or tell Python to ignore decoding errors.
>>> Should probably do something at least...
>>>
>>> Cheers,
>>> Ulf
>>
>> Leaning towards just forcing UTF-8. It's what you want in 99% of
>> cases, and ignoring decoding errors would be unsafe for Unicode string
>> values.
>>
>> Could make the forcing optional, and default to on...
>>
>> Cheers,
>> Ulf
>
> Went with a more general solution:
> https://github.com/ulfalizer/Kconfiglib/commit/da40c014398f329b324a2eb9de062344e773dc74
>
> You can now specify any encoding (or None, to use the encoding
> specified in the environment), with "utf-8" as the default. That
> default probably saves a bunch of pain in practice.
Hi,
(with new kconfiglib.py and menuconfig.py)
Thanks for the fixes.
If I use "LC_CTYPE=C.UTF-8" then I get the down arrows in the bottom colored
bar. Without that, I get an upside-down T (that is 193, 0xc1, line drawing
character in the IBM extended character set).
Hm. With LC_CTYPE=C.UTF-8, the upper colored bar prints up arrows.
Without that, it prints ^^^^^^^^^^^^^^.
That's nice that it can do either.
Being a vim user, I do like the optional navigation keys.
--
~Randy
next prev parent reply other threads:[~2018-05-03 20:28 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 0:57 Ulf Magnusson
2018-05-01 17:56 ` Randy Dunlap
2018-05-01 18:13 ` Randy Dunlap
2018-05-01 18:52 ` Randy Dunlap
2018-05-01 19:33 ` Ulf Magnusson
2018-05-03 2:47 ` Ulf Magnusson
2018-05-03 20:31 ` Randy Dunlap
2018-05-03 21:26 ` Ulf Magnusson
2018-05-01 19:12 ` Ulf Magnusson
2018-05-01 19:47 ` Ulf Magnusson
2018-05-01 21:07 ` Ulf Magnusson
2018-05-03 20:28 ` Randy Dunlap [this message]
2018-05-03 22:48 ` Ulf Magnusson
2018-05-04 0:05 ` Randy Dunlap
2018-05-08 16:59 ` Ulf Magnusson
2018-05-11 1:22 ` Ulf Magnusson
2018-05-20 3:45 ` Randy Dunlap
2018-05-20 3:51 ` Randy Dunlap
2018-05-20 4:24 ` Ulf Magnusson
2018-05-20 5:50 ` Ulf Magnusson
2018-05-20 4:03 ` Randy Dunlap
2018-05-20 4:47 ` Ulf Magnusson
2018-05-20 5:13 ` Ulf Magnusson
2018-05-21 2:45 ` Randy Dunlap
2018-05-21 3:33 ` Ulf Magnusson
2018-05-21 3:47 ` Randy Dunlap
2018-05-22 10:18 ` Ulf Magnusson
2018-05-25 22:06 ` Randy Dunlap
2018-05-20 7:51 ` Ulf Magnusson
2018-05-21 2:22 ` Randy Dunlap
2018-05-20 6:03 ` Ulf Magnusson
2018-05-14 16:58 ` Pavel Machek
2018-05-14 18:12 ` Ulf Magnusson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d9be2f2-3fbe-411b-8529-0e0847f01346@infradead.org \
--to=rdunlap@infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ulfalizer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®