The "loop and a half"

Chris Angelico rosuav at gmail.com
Sun Oct 8 12:13:38 EDT 2017


On Mon, Oct 9, 2017 at 2:01 AM, bartc <bc at freeuk.com> wrote:
> However as graphics became more mainstream then yes I did adopt some
> commonly expected styles (menubars for example). As for Alt-F4, if that
> generates a WM_CLOSE message for example, then I would be obliged to deal
> with it.

Yes, it usually does generate that. Why? Because your desktop manager
translates concrete user actions into abstract events like "close
window" - and does so according to a number of standards. In case you
haven't noticed, those standards are not 100% consistent across
platforms. So that means that...

On Sun, Oct 8, 2017 at 10:46 PM, bartc <bc at freeuk.com> wrote:
> On 07/10/2017 15:40, Steve D'Aprano wrote:
>> Or you could just follow the expected Unix interface instead of inventing
>> your own.
>
> Your job is to port an editor that people have been using for 30 years to
> Linux. The first thing you do is to change all the commands and shortcuts to
> match what is typical on Linux? So that no-one who was familiar with it as
> it was can actually use it?

... yeah, you absolutely *should* follow your OS's conventions, and
you automatically *will* if you're using a properly-designed GUI
toolkit. Why should it be different with the console? For instance,
anyone on Linux will understand what this prompt notation means:

Use config file: [~/.flurblerc]

Yep, definitely follow your host platform's conventions.

ChrisA



More information about the Python-list mailing list