Python plugin addiction

Study group dedicated to learning how to code in the Python language.

Moderators: snarkout, Patrick, dann

Post Reply
User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Python plugin addiction

Post by Jza » Thu May 24, 2007 10:57 am

Wow ever since starting this study group I have been amazed by the ammount of applications that support Python.

So far I have discover other gnome apps that support python including:
- Epiphany web browser
- Rythmbox music player
- Gnome-Xchat chat client
- Gnome appletts

I know many users here are fan of KDE however I don't know how strenghten is the python development within KDE. I know that Kdevelop has ways to use Python, Ruby and Javascript as a 'glue-code'.
Alexandro COLORADO

User avatar
Vogateer
Posts: 700
Joined: Thu Nov 17, 2005 11:18 pm
Location: Norman, Oklahoma
Contact:

Post by Vogateer » Thu May 24, 2007 2:41 pm

I sometimes hear Ruby mentioned alongside KDE, though I'm pretty sure Plasma allows for desktop applets to be written in Python, as well.

Speaking of Epiphany, you know, that's a pretty good browser. I mainly have one complaint, and that's when you open a new tab, it doesn't send the cursor to the location bar. I don't know why that is, but I hate having to hit Ctrl+T, Ctrl+L to get there when every single other browser I've ever used sends you to the location bar when you open a new tab. If it weren't for that, I think it would be my main browser.
Vim is beautiful

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Post by Jza » Thu May 24, 2007 4:21 pm

Interesting a quick google on epiphany python new tab got me to this blog post on doing this through the python console. What's cool is how little code was needed:

Code: Select all

import epiphany

tab = window.get_active_tab()
url = 'http://www.python.org'
flags = epiphany.NEW_TAB_IN_EXISTING_WINDOW \
    | epiphany.NEW_TAB_APPEND_LAST \
    | epiphany.NEW_TAB_OPEN_PAGE

epiphany.ephy_shell_get_default().new_tab(
    window,
    tab,
    url,
    flags
    )
I guess the only thing needed here is to do some 'setCursorLocation' and position it to the address bar.
Alexandro COLORADO

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Post by Jza » Thu May 24, 2007 4:47 pm

So after a quick poking at the developers at #epiphany they point me to this component which is the one that it would be needed to be worked at ephy_toolbar_activate_location

Oh and BTW after last TLLTS show I guess MoneyDance also has a python binding through Jython which is great.
Alexandro COLORADO

Post Reply