From: Dan F. <tem...@ya...> - 2005-05-04 08:11:45
|
On Wed, 2005-05-04 at 07:32 +0200, Michael Reinelt wrote: > Hi Dan again, > > > I'm currently trying to steal some threading code from the plugin_exec > > to put into the plugin_python. I have this idea of creating a > > really slow version of the python::exec function, because then i could > > easily create plugins for upload and download status of eMule and > > mldonkey (with a polling period of 5 minutes or so). > > Why sould it be very slow? I think that python gets initialized only > once, further calls to python::exec() should be quite fast? True > > If you define an update interval of 5 minutes to the widget calling > python::exec, I see no problem here.... You are correct, i was not very clear. What i was trying to say is that it needs a slow update interval so that it does not bug the eMule client too much. > Or is the problem that the python script itself may take some time? Then > it would be a good idea to call it in a seperate thread... > And that it needs to be executed in a thread so that it does not slow down the other timing events of the lcd, it is after all a remote call (http) to another host and that may take an undefined amount of time. ( i don't think python itself would make us miss a 'tack' ) So what i'm trying to do is simply a threaded version of the current plugin_python, then i wouldn't have to login and logout of the eMule process every few minutes as the exec version does. /dan |