Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Cross-Platform Python3 Equivalent to notify-send

Reply
Thread Tools

Re: Cross-Platform Python3 Equivalent to notify-send

 
 
Chris Angelico
Guest
Posts: n/a
 
      07-27-2013
On Sat, Jul 27, 2013 at 1:22 PM, Devyn Collier Johnson
<(E-Mail Removed)> wrote:
> That really sucks. I was hoping Python had some way of doing that. All that
> it needs to do is display a little box at one of the corners of the screen.
> I thought someone would have implemented something by now. Thank you anyway.


Despite the best efforts of a pretty talented core dev team, Python is
not yet capable of magic If you browse the python-dev archives,
you'll see how much of a nightmare cross-platform compatibility can be
(eg the recent discussion on cloexec and passing file descriptors to
subprocesses); often, what you might think (from a user's point of
view) is fairly trivial will turn out to be quite tricky.

That said, though, a lot of GUI toolkits will have a means for you to
highlight a window. In GTK, it's called "present" (as in, "Lord User,
may I present Sir Window and Mrs Window?"). There may be window
managers that don't support the feature (and there are certainly those
that let the user disable it, which you should respect), but AFAIK all
of them should at least accept the command.

http://www.pygtk.org/docs/pygtk/clas...indow--present

So your best bet may be to simply create yourself a small window, then
present it. On Windows XP, I think that'll flash the window in the
task bar, which is usually enough highlight. On my Debian Wheezy with
Xfce, it brings the window to the top of the Z-order, and optionally
moves it to the current workspace (user's option, NOT program's).

ChrisA
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-Platform Python3 Equivalent to notify-send Devyn Collier Johnson Python 1 07-27-2013 06:57 PM
Re: Cross-Platform Python3 Equivalent to notify-send Devyn Collier Johnson Python 4 07-27-2013 06:08 PM
Re: Cross-Platform Python3 Equivalent to notify-send Chris “Kwpolska” Warrick Python 0 07-27-2013 11:31 AM
Re: Cross-Platform Python3 Equivalent to notify-send Chris “Kwpolska” Warrick Python 0 07-27-2013 11:30 AM
Cross-Platform Python3 Equivalent to notify-send Devyn Collier Johnson Python 0 07-25-2013 01:39 PM



Advertisments