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


Groups > comp.lang.python > #75874

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

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>
Date 2014-08-08 19:32 +1000
Subject Re: Keep one GUI always on TOP while python code is running
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.12744.1407490345.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Aug 8, 2014 at 6:57 PM, Paul Rudin <paul.nospam@rudin.co.uk> wrote:
> Chris Angelico <rosuav@gmail.com> writes:
>
>> On Fri, Aug 8, 2014 at 3:57 PM, Jaydeep Patil <patil.jay2009@gmail.com> wrote:
>>> I mean to say, One GUI should be always on top from start to end of code running.
>>> So that user cant do any other operation.
>>> I am using wxpython
>>
>> Ah, that would be called "System Modal", and should be reserved for
>> absolutely critical system-wide alerts. It's also a feature that's
>> simply not available to most user-space programs, and not available in
>> most GUI toolkits.
>>
>> Short answer: Don't.
>
> There are commercial software packages that do this sort of
> thing. Examsoft is one - the idea being that people can take exams
> without access to other software at the same time (so that, for example,
> they could look at previously prepared notes).

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 (for instance, on all my
Linux systems, I can hit Ctrl-Alt-F1 to switch away from the GUI
altogether). So I'm dubious about its value for anything that isn't an
absolutely critical alert. With the OS/2 Presentation Manager, I had
SystemModal available as a window flag, and I used it for two
purposes: an out-of-memory alert (or similarly critical resource
shortage), and a pseudo-login screen (it just asked for a name, no
password or anything, and it didn't change what you had access to - it
was for the purposes of logging and messaging identification, nothing
more); and the latter didn't really need to be system modal, it was
just for convenience.

If there's no way to make a wxpython window system modal, I would say
it's no great loss. The chances of the feature being misused are
extremely high; the cases where it's actually needed are extremely
rare. Hence my short answer of "Don't"; honestly, there are more times
when you need to optimize Python code for performance than there are
times to create system modal windows.

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