Re: [Deskbar] Learning Python and scripting a handler
- From: "Nigel Tao" <nigel tao gnome gmail com>
- To: "Will Simpson" <linux photo geek gmail com>
- Cc: deskbar-applet-list gnome org
- Subject: Re: [Deskbar] Learning Python and scripting a handler
- Date: Wed, 29 Nov 2006 11:16:09 +1100
On 11/28/06, Will Simpson <linux photo geek gmail com> wrote:
I have an idea for a handler but I have few python skills. I'm willing to
learn and have read some of the popular python tutorials. Anyways, I'm sort
have got a start but am stuck figuring our which classes and functions to
use and how to have deskbar parse a file. My idea is to have a handler that
reads a file which has a list of commands in it and then execute the command
matching the query. At first glance seems dumb but the file I'd like to
parse is .aliases which contains all my alias commands. If this works as
envisioned, I could create an alias of 'ff' for firefox or 'mail' for
evolution or 'vt' for gnome-terminal. Once this works I have some other
ideas to extend this further.
Anyone have tips for how I'd get started.
Try copying the Epiphany handler, which (1) reads a file (via
load_shortcuts in deskbar/Browsermatch.py) and (2) allows for
search-aliases, so that Deskbar'ing for "wp foo" will search the
wikipedia for foo.
http://cvs.gnome.org/viewcvs/deskbar-applet/deskbar/handlers/epiphany.py?view=markup
There's also the wiki page, that has lots of links to other handlers'
source code.
http://live.gnome.org/DeskbarApplet/Extending
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]