Re: Kupfer plugin design



The file kupfer/task.py contains the class ThreadTask, which can be used to run an Action in a different thread. Basically, The Action will have
def is_async:
  return True
and then Action.activate will return an object that inherits from ThreadTask, and you implement the functionality in that object.
The file kupfer/plugin/urlactions.py (amongst others) shows an example of this.

2010/10/26 Michał Klich <michal michalklich com>
Hi,

I am writing Remember The Milk (rtm) plugin for kupfer. Problem i stumbled upon is related to network.
Every Action that has to connect to rtm API is blocking kupfer ui.
How would i process Action in background so user can use kupfer? I have tried multiprocessing but it would still block ui, obviously path i am taking is wrong.
Any guidance would help.

Thanks

--
Pozdrowienia / Regards
Michał Klich
e: michal michalklich com
GnuPG: 7302F29A
http://www.michalklich.com
http://www.gdziebylkaziu.pl

_______________________________________________
kupfer-list mailing list
kupfer-list gnome org
http://mail.gnome.org/mailman/listinfo/kupfer-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]