View Single Post
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#3
Originally Posted by qwerty12 View Post
Osso context refers to registering the app from DBUS, I don't know how it works for python but for transmission, I did things like:



(I had previously initialized it with:
osso_initialize ("com.transmissionbt.Transmission", VERSION, FALSE, NULL);
)

In python, it's something like:
import osso
osso.Context('com.whatever.whatever','<version>', False)

(Last param is always false - true is depreciated)
I added my program as a global variable:

Code:
osso_context = osso.Context('com.quickclip.Quickclip','.21', False)
Then just slipped osso_context in as the third argument in my help function, and it....drum roll....WORKED! Yay!

Thanks a lot qwerty12!

Sorry if this has confused you even more, I'm only familiar with C and I can't even code in C.
You should learn Python I spent 6 months trying to learn C/C++, and nothing. My biggest achievement was a terminal program that computed Heat Index/Wind Chill/Dew Point from the necessary information. Then one day I came across a very informal Python tutorial (it was maybe 6-7 short chapters), spent 30 minutes reading that. The very next day, I wrote my Weather program in Python, the same one it took me 6 months to figure out how to do in C. I immediately began programming in Python. It just makes sense
 

The Following User Says Thank You to BrentDC For This Useful Post: