Page 1 of 1

Python plugin addiction

Posted: Thu May 24, 2007 10:57 am
by Jza
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'.

Posted: Thu May 24, 2007 2:41 pm
by Vogateer
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.

Posted: Thu May 24, 2007 4:21 pm
by Jza
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.

Posted: Thu May 24, 2007 4:47 pm
by Jza
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.