Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75887

Re: Keep one GUI always on TOP while python code is running

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'say,': 0.05; 'correct.': 0.07; 'extent': 0.07; 'reason,': 0.07; 'subject:code': 0.07; 'app,': 0.09; 'method,': 0.09; 'screen.': 0.09; 'subject:while': 0.09; 'system?': 0.09; 'cc:addr:python-list': 0.11; 'gui': 0.12; "wouldn't": 0.14; 'windows': 0.15; ':-p': 0.16; 'exceptions,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'happy.': 0.16; 'password,': 0.16; 'presume': 0.16; 'saver': 0.16; 'software;': 0.16; 'subject:GUI': 0.16; 'two,': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'platforms': 0.22; 'aug': 0.22; 'cc:addr:python.org': 0.22; '"you': 0.24; 'features,': 0.24; 'instance,': 0.24; 'replace': 0.24; "shouldn't": 0.24; 'cc:2**0': 0.24; 'login': 0.25; 'equivalent': 0.26; 'switch': 0.26; 'least': 0.26; '(for': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'about.': 0.31; "d'aprano": 0.31; 'disable': 0.31; 'exceptions': 0.31; 'really,': 0.31; 'steven': 0.31; 'probably': 0.32; 'critical': 0.32; 'linux': 0.33; 'running': 0.33; 'fri,': 0.33; 'screen': 0.34; 'could': 0.34; "can't": 0.35; 'agree': 0.35; 'except': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'in.': 0.36; 'subject:one': 0.36; 'doing': 0.36; 'possible': 0.36; 'should': 0.36; 'application': 0.37; 'so,': 0.37; 'two': 0.37; 'pm,': 0.38; 'short': 0.38; 'anything': 0.39; 'expect': 0.39; 'does': 0.39; 'extremely': 0.39; 'sure': 0.39; 'skip:p 20': 0.39; 'most': 0.60; 'full': 0.61; 'entire': 0.61; 'simply': 0.61; "you're": 0.61; 'first': 0.61; 'offer': 0.62; 'such': 0.63; 'box,': 0.64; 'more': 0.64; 'account': 0.65; '(that': 0.65; 'answer.': 0.68; 'of:': 0.68; 'wish': 0.70; 'special': 0.74; 'course...': 0.84; 'deserves': 0.84; 'exam': 0.84; 'locked': 0.84; 'subject:Keep': 0.84; 'absolutely': 0.87; 'works!': 0.91; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=q60MFtKilNFXlPQnkJ9IeXeWJcXh7vcjva0MIn/3czM=; b=ohqu22pjR/njC6jhV/bFOKFD0cTSIhAMcIVqcZcz++BOCaQgsnDJNlBqZnhJb0MxED xVvkjImkAas8aS8LJC9uVwUICDKUNC1oDY94B6p9s0PM8gX5+AhvTf4CUObESrsscJGk +STF+gocItPJ03NyUWTZgXx6y/dyGgu/1bYqIP2tQtQyHpUiFeTOe99izofOn5f8bRsl zk6xwRH4FFq09rtOXH5sYV3g65rPVFrlhhD8DcPn3d3ADRydlcuoQ4k8kOB87as7a9Z4 t+qSZC3dkN6dw3DXAvbBLJrR6uGdbR4kEJEDwOisEGKW2hM57mOfkkg5XTdvRym/7z7Y 1TDQ==
MIME-Version 1.0
X-Received by 10.43.96.65 with SMTP id cf1mr12513408icc.26.1407507631947; Fri, 08 Aug 2014 07:20:31 -0700 (PDT)
In-Reply-To <53e4d7a0$0$24963$c3e8da3$5496439d@news.astraweb.com>
References <e2709e26-d2e9-439a-8af4-7a7a7562ce9e@googlegroups.com> <mailman.12727.1407416270.18130.python-list@python.org> <32f85c79-17a1-4d2f-a926-43812b8083ed@googlegroups.com> <mailman.12736.1407477767.18130.python-list@python.org> <85fvh7icj4.fsf@rudin.co.uk> <mailman.12744.1407490345.18130.python-list@python.org> <53e4d7a0$0$24963$c3e8da3$5496439d@news.astraweb.com>
Date Sat, 9 Aug 2014 00:20:31 +1000
Subject Re: Keep one GUI always on TOP while python code is running
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12749.1407507634.18130.python-list@python.org> (permalink)
Lines 76
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1407507634 news.xs4all.nl 2940 [2001:888:2000:d::a6]:35911
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75887

Show key headers only | View raw


On Fri, Aug 8, 2014 at 11:58 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> Chris Angelico wrote:
>
>> Yeah; like I said, "Don't" is the short answer. There will be
>> exceptions, some extremely rare situations when system modality is
>> correct; but fundamentally, it's impossible to use GUI software to
>> control what a person does with a computer
>
> There are exceptions, but it's impossible? Impossible except for the
> exceptions, I presume :-P

There are exceptions to the rule "you shouldn't use system modal
windows". It is, however, fundamentally impossible for GUI software to
completely control what the person does - system modality is defined
only to the extent of the GUI.

>> (for instance, on all my
>> Linux systems, I can hit Ctrl-Alt-F1 to switch away from the GUI
>> altogether).
>
> Does that work when xscreensaver or equivalent has locked the system? If so,
> that's a security vulnerability.

Absolutely it works! However, what you get to is a terminal with a
login prompt. If you don't know a valid userid and password, you can't
get in. (And if you *do* know them, you can probably get in through
the GUI, too, although it's possible for a screen saver to lock such
that no other account can log in.)

>> So I'm dubious about its value for anything that isn't an
>> absolutely critical alert.
>
> Well, there's at least two use-cases I can think of:
>
> * screen locking, as in screen savers;
>
> * login screens;

With these two, it's deliberately locking only the GUI, so system
modality could be correct. But really, it's more about covering the
whole screen; system modality is more about disabling the whole
screen. So they're still not a perfect match.

> * exam software;

This is what I'm dubious about. Since you can always log in via some
other method, or brute-force something (eg replace one of the system
accessibility programs with your own tool), it's impossible for the
software to stop you from running something else. And if the computer
you're doing this on is so locked down that you can't pull up your
notes in some other app, it may as well simply be so locked down that
you can't get your notes onto that computer in the first place.

> * emulating full screen arcade games;

Why should that disable access to everything else? Most full screen
games let you alt-tab away from them (preferably auto-pausing the
game). If a game goes system modal on me, I would not be happy.

> * my application is SOOOOO SPECIAL that it deserves to take over the
>   entire GUI Just Because I Can.

And that one is definitely not a reason, as I'm sure you agree :)

> I don't know any platform-independent GUI toolkits which offer this out of
> the box, but I expect that there's probably a way to do it in a platform
> specific way on each platform you wish to support.

There may be; there also may not (that is to say, there may be
platform-specific ways on some, but not all, platforms - I'm not sure
Windows has the functionality). But that's par for the course... if
every platform had the exact same features, we wouldn't need multiple
platforms.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Keep one GUI always on TOP while python code is running Jaydeep Patil <patil.jay2009@gmail.com> - 2014-08-07 04:24 -0700
  Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-07 22:57 +1000
    Re: Keep one GUI always on TOP while python code is running Jaydeep Patil <patil.jay2009@gmail.com> - 2014-08-07 22:57 -0700
      Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-08 16:02 +1000
        Re: Keep one GUI always on TOP while python code is running Paul Rudin <paul.nospam@rudin.co.uk> - 2014-08-08 09:57 +0100
          Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-08 19:32 +1000
            Re: Keep one GUI always on TOP while python code is running Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-08 23:58 +1000
              Re: Keep one GUI always on TOP while python code is running Marko Rauhamaa <marko@pacujo.net> - 2014-08-08 17:06 +0300
              Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-09 00:20 +1000
                Re: Keep one GUI always on TOP while python code is running Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-09 04:04 +1000
                Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-09 08:31 +1000
                Re: Keep one GUI always on TOP while python code is running Grant Edwards <invalid@invalid.invalid> - 2014-08-11 22:14 +0000
                Re: Keep one GUI always on TOP while python code is running Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-08-11 19:47 -0400
              Re: Keep one GUI always on TOP while python code is running alister <alister.nospam.ware@ntlworld.com> - 2014-08-08 14:50 +0000
                Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-09 01:01 +1000
  Re: Keep one GUI always on TOP while python code is running Rustom Mody <rustompmody@gmail.com> - 2014-08-08 06:44 -0700
    Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-08 23:51 +1000
      Re: Keep one GUI always on TOP while python code is running Rustom Mody <rustompmody@gmail.com> - 2014-08-08 07:23 -0700
        Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-09 00:34 +1000
          Re: Keep one GUI always on TOP while python code is running Rustom Mody <rustompmody@gmail.com> - 2014-08-08 07:45 -0700
            Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-09 00:52 +1000
              Re: Keep one GUI always on TOP while python code is running Rustom Mody <rustompmody@gmail.com> - 2014-08-08 07:58 -0700
                Re: Keep one GUI always on TOP while python code is running Chris Angelico <rosuav@gmail.com> - 2014-08-09 01:05 +1000
  Re: Keep one GUI always on TOP while python code is running Grant Edwards <invalid@invalid.invalid> - 2014-08-11 22:08 +0000

csiph-web