Re: [gedit-list] Scheduling timers from plugins



Dustin,

I'd like to think you should be able to use gobject.timeout_add() and gobject.timeout_add_seconds().  I don't think they will interfere with GTK's loop.  Regarding the error when you import gobject:

- which version of Python are you using?
- which version of gedit?
- do you know which version of GLib is installed on your system?
- which version of which operating system (e.g. Debian, Fedora, Ubuntu) are you running?

adam

On Sat, Oct 26, 2013 at 6:17 PM, Dustin Oprea <myselfasunder gmail com> wrote:
What's an acceptable strategy to regularly invoke functionality in a Python plugin (via some kind of timer)?

The only examples I can find for timers with PyGTK, in general, are gobject.timeout_add() and gobject.timeout_add_seconds(), but I think they're deprecated as the plugin completely ceases to work when I import gobject (I get a "type object 'gobject.GObject' has no attribute 'ref" error).

I'm also assuming that normal Python timers might interfere with GTK's loop, so I shouldn't be using them.


Dustin Oprea



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