Re: [gedit-list] Gedit build plugin in python, need help: Thread doesn't start/run.
- From: Paolo Borelli <pborelli katamail com>
- To: Jan Niklas Hasse <jhasse gmail com>
- Cc: gedit-list gnome org
- Subject: Re: [gedit-list] Gedit build plugin in python, need help: Thread doesn't start/run.
- Date: Thu, 26 Jul 2007 16:43:17 +0200
Il giorno gio, 26/07/2007 alle 15.53 +0200, Jan Niklas Hasse ha scritto:
> Hello everyone,
>
> I'm German, so I'm sorry if my English is bad. I'm currently
> developing a plugin for gedit for building. There is a plugin, but i
> try to implement auto-save before building, double-click should brings
> you to the line where the error is, and execution if building was
> successful.
>
> I'm using python (which i don't know much) but now I've got a big
> problem: I'm starting a Python-Thread which executes the building
> command (scons or make). But the Thread doesn't "run". Only if i'm
> doing something with gedit, like minimizing it or opening a new file.
> I don't have an idea why this happens, so maybe you can help me.
>
> Any clues you can give me would be great, or if you know a place where
> I could also ask. The plugin is attached.
>
Hi Jan-Nik,
using python threads from within a plugin is not supported. Honestly I
am not sure what is wrong with it but it's known that they block the UI.
My suggestion is that you avoid threads and instead spawn a separate
project to run the build into. You can take a look at what the External
Tools plugin does[1].
By the way, this is the right place to ask or you can come on irc (I saw
in the logs you asked there but I was not around at the time)
ciao
Paolo
[1] In fact the external tools plugins allows to run make, scons etc way
more easily by writing a simple shell script, though it is not able to
provide ad-hoc features like click-on-error-moves-to-error-line.
> Jan-Nik
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]