Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'url:sourceforge': 0.03; 'messages.': 0.04; 'calls.': 0.07; 'option,': 0.07; 'python': 0.09; 'bindings': 0.09; 'icon': 0.09; 'pointers': 0.09; 'wrong,': 0.09; 'gui': 0.11; "wouldn't": 0.11; 'subject:python': 0.11; 'appreciated!': 0.16; 'easier.': 0.16; 'folks,': 0.16; 'qt,': 0.16; 'remembered': 0.16; 'simplest': 0.16; 'sources,': 0.16; 'subject:area': 0.16; 'url:freedesktop': 0.16; 'url:standards': 0.16; 'certainly': 0.17; 'instance': 0.17; '>>>': 0.18; 'app': 0.19; 'python?': 0.20; 'sort': 0.21; 'all,': 0.21; 'are.': 0.22; 'interpret': 0.22; 'sorry,': 0.22; "i'd": 0.22; 'cheers,': 0.23; 'programming': 0.23; 'task': 0.23; 'idea': 0.24; 'header:In-Reply-To:1': 0.25; 'setting': 0.26; 'wrote': 0.26; 'guess': 0.27; 'implemented': 0.27; 'right.': 0.27; 'appreciated': 0.27; 'message-id:@mail.gmail.com': 0.27; 'interface': 0.27; 'options': 0.27; 'this?': 0.28; '>>>>': 0.29; 'succeed': 0.29; 'url:mailman': 0.29; 'source': 0.29; "i'm": 0.29; 'daniel': 0.30; 'window': 0.30; 'stuff': 0.30; 'code': 0.31; 'implement': 0.32; 'url:python': 0.32; 'not.': 0.32; 'could': 0.32; 'url:listinfo': 0.32; 'certain': 0.33; 'impression': 0.33; 'programming,': 0.33; 'zero': 0.33; 'to:addr:python-list': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'christian': 0.34; 'described': 0.35; 'from:addr:googlemail.com': 0.35; 'recieve': 0.35; 'received:209.85.220': 0.35; "won't": 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'really': 0.36; 'but': 0.36; 'url:org': 0.36; 'alone': 0.36; 'does': 0.37; 'level': 0.37; 'uses': 0.37; 'why': 0.37; 'usual': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'things': 0.38; 'possible.': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'application': 0.40; 'where': 0.40; 'header:Received:5': 0.40; 'url:mail': 0.40; 'think': 0.40; 'your': 0.60; 'stand': 0.61; 'first': 0.61; 'here:': 0.62; 'is.': 0.62; 'life': 0.66; 'brand': 0.78; 'low': 0.83; 'down!': 0.84; 'etc,': 0.84; 'mistaken': 0.84; 'subject:notification': 0.84; 'subject:system': 0.84; 'to:name:python': 0.84; 'hand,': 0.97; 'tough': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/GDvAMcniufys6fEAWdKrcEGRcnCLMwSgK/BdVNFbR0=; b=H1XeWhFq3Us3Ndd2xzZcYdYkIESLdHh5essQ3POyq5yeytlTeRGGBmtroOge5NbkS+ SFJ+Xtt45y6LVoMc6KL7NkDfILhKR9x8BMr3yGqIFH5aRUWNTq9wIN7JzpAeNGqbEgNz Xwyuy4BWFwPAQgKDvVRSVs0ak5xBw5ak2wlyAWKJTZL2ulfOGC+VQrk/g6+trgUXGHqF GISc+E2NRUeKqxoB0kTjlOe803Dwm/UttDPGhOknkw8t+0yzeiuP8vhRuXUS+EQbO1oB C+wWik3QcWLwcC86GFH2GEXWF80rTL4/XIVsn2/Y7+uyYGaCP2lByeZhr7ow+gEJjZeZ cqcQ== MIME-Version: 1.0 In-Reply-To: References: <7585937255598573571@unknownmsgid> Date: Wed, 17 Oct 2012 09:49:08 +0200 Subject: Re: Fwd: system tray or notification area in python From: Daniel Fetchinson To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 69 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350460151 news.xs4all.nl 6944 [2001:888:2000:d::a6]:58991 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31483 >>>> Hi folks, >>>> So I thought I would write a brand new stand alone system tray or >>>> notification area in python. I guess I need to use gtk bindings or >>>> some such but don't really know what my options are. >>>> >>>> Where would I start something like this? >>>> Any pointers would be greatly appreciated! >>>> >>> Why not look at the source code of the current app your using to get >>> an idea how that application accomplishes said task? >> >> I actually did that already it's using the C bindings of gtk. > > I think you are mistaken - if its this one: > http://stalonetray.sourceforge.net/ Yes, that's it. > I had a quick look into the sources, it does not use gtk at all, it uses > low level X11 calls. Programming in this way is very tedious. Sorry, you are right. I was mixing things up, I just remembered it was gtk, apparently it's not. >> But I have zero experience with gui programming in python. So any >> pointers would be much appreciated how to implement a system tray in >> python. Gtk is I guess just one option, one could use other stuff from >> python but I wouldn't know what the simplest approach is. > > I'm not sure it is even possible. "Usual" GUI applications just need to > request certain features from their window manager such as the setting > the program icon or requesting a certain position on the screen. That is > what is implemented in the usual toolits like Tk, QT, and gtk. That is my impression as well, tk, qt, etc, won't be good for this task but I thought there are some sort of X bindings in python that will make writing low level X applications in python possible. For instance a system tray :) > A window manager, on the other hand, must be able to recieve and > interpret these messages. For a system tray, they are described here: > > http://standards.freedesktop.org/systemtray-spec/systemtray-spec-0.3.html > > I have not studied the whole interface of the aforementioned toolkits, > but I suspect that there is no way around writing low level Xlib code in > order to recieve these messages. Right, but nobody wrote Xlib bindings for python? > Don't take it wrong, but when you write that you have no experience with > GUI programming, I'd start another projet first - I think you will have > a tough way to succeed with this project. I certainly wouldn't start with Xlib in C, but if python bindings would be available that would make life much easier. Cheers, Daniel > Christian > -- > http://mail.python.org/mailman/listinfo/python-list > -- Psss, psss, put it down! - http://www.cafepress.com/putitdown