maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [M5] E-mail/IM style notifications from Python3? (https://talk.maemo.org/showthread.php?t=97263)

marmistrz 2016-08-15 18:35

[M5] E-mail/IM style notifications from Python3?
 
So, I have an app written with Python 3, using the requests module for the http API and gi.repository.Notify for showing notifications. Now I'd like to port it to Fremantle.

And here the problem arises. There are virtually no modules for Python 3 on Fremantle. Is there any way I could bundle the modules with my app?

I guess that porting the needed modules from Debian is out of reach. And requires much too much work.

Old contents:
I'm working on a simple app written in python3 which core feature is displaying notifications. It already works on desktop using the python bindings for libnotify.

Code:

import gi
gi.require('Notify', '0.7')
from gi.repository import Notify

# and so on

Now I'd like to port it to Fremantle. There are no binding for libnotify for python3 on Fremantle, no dbus module for python3.

I'll have to create a separate method of displaying notifications and I don't mind it. But what method would you suggest?
Using shell and `dbus-send` comes to my mind but its awful.

justmemory 2016-08-15 19:45

Re: [M5] E-mail/IM style notifications from Python3?
 
Hi,

I do not know whether it is working with python3 but maybe you can try this.

jm

marmistrz 2016-08-23 10:31

Re: [M5] E-mail/IM style notifications from Python3?
 
Basically, the only solution for me seems to be running this all in Easy Debian. After small patching one can even easily run daemons that way.

Android_808 2016-08-23 11:16

Re: [M5] E-mail/IM style notifications from Python3?
 
What modules does it need? Easy Debian sounds like overkill.

I've still got a series of Perl modules to upload to fix get_iplayer. I posted a RFC to see what the preferred way of doing it would be (minimal to get it working vs more packages but potentially better performance but more to maintain) but never got a proper response.

marmistrz 2016-08-23 13:10

Re: [M5] E-mail/IM style notifications from Python3?
 
Quote:

Originally Posted by Android_808 (Post 1513305)
What modules does it need? Easy Debian sounds like overkill.

I've still got a series of Perl modules to upload to fix get_iplayer. I posted a RFC to see what the preferred way of doing it would be (minimal to get it working vs more packages but potentially better performance but more to maintain) but never got a proper response.

Basically:
Code:

import notify2
import xdg.BaseDirectory
import requests

or counterpart.

Our dbus is too old for the current Debian version of python-dbus, notify2 uses dbus.


All times are GMT. The time now is 10:47.

vBulletin® Version 3.8.8