d, they're in a repo:
https://bitbucket.org/wodny/pygtk-threads
Thanks, that was interresting! For the moment I don't think it is worth
the extra hassle of defining a GUI thread for my project, but maybe I'll
use this in the future.
--
Antoon Pardon
th gtkthread = False, doesn't pose a problem
but calling it with gtkthread = True makes it block on
one computer.
--
Antoon Pardon
___
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
ead.
I only have limited experience with gtk not running in the main thread,
but it didn't cause any problems. But I only work on linux and I heard
that on windows it could indeed be a problem.
--
Antoon Pardon
___
pygtk mailing list pygtk@daa.c
and sys.exit() does the job, albeit with the occasional
> exception when a thread doesn't check it's flag in time). Heck just going
> into process explorer and killing the thing is acceptable at this stage.
> But this may change, and I'll be searching for this e-mail again
ed in a thread and it works without a problem.
It is a rather peculiar program though since it is a kind of
test suite for other GTK programs. It was the only time I
thought it usefull to have GTK started from a thread though.
--
Antoon Pardon
_
heck their "die" flag in time.
Well I once wrote the following, to allow threads raising exceptions
in each other.
http://groups.google.be/group/comp.lang.python/msg/5833130893cee567?hl=nl&;
Maybe the idea is usefull for you.
--
Antoon Pardon
On Wed, Mar 29, 2006 at 01:52:01PM -0600, Jason Pepas wrote:
> On Wednesday 29 March 2006 12:21 pm, you wrote:
> > Jason Pepas napisa?(a):
> > > When I want to stop my program, how do I interrupt what the worker
> > > threads are doing to tell them it is time to stop?
> >
> > You can poll shared ob
Do_Emit
gob.idle_add(Do_Emit, obj, *args, **{"priority" : gob.PRIORITY_HIGH})
#end Emit
To be used as follows:
Emit(obj, signal, args)
--
Antoon Pardon
___
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/list
rgument to gobject.source_remove, then cleanup is called
with args provided.
When a tube is registered I could request such a source
with as cleanup a method to remove the callback and
I could then return the ID.
Is there a possiblity for this?
--
Antoon Pardon
___
pyg
On Fri, Oct 28, 2005 at 07:47:42AM -0700, Brian wrote:
> On Fri, 2005-28-10 at 14:35 +0200, Antoon Pardon wrote:
>
> >
> > Well I made a version of my demo program based on this dispatcher, it
> > is at http://www.pardon-sleeuwaegen.be/antoon/python/demo3c.py
> >
On Thu, Oct 27, 2005 at 01:38:24PM +0100, Gustavo J. A. M. Carneiro wrote:
> Qui, 2005-10-27 às 14:06 +0200, Antoon Pardon escreveu:
> > I have written a small gtk threading tutorial with a number
> > of demo's and an (IMO) helpfull module. I don't fancy
> > my
On Thu, Oct 27, 2005 at 07:47:41AM -0700, Brian wrote:
> On Thu, 2005-27-10 at 14:06 +0200, Antoon Pardon wrote:
> > I have written a small gtk threading tutorial with a number
> > of demo's and an (IMO) helpfull module. I don't fancy
> > myself to be a good w
I have written a small gtk threading tutorial with a number
of demo's and an (IMO) helpfull module. I don't fancy
myself to be a good writer, but I thought the demo's
would make up for that. Let me know what you think.
http://www.pardon-sleeuwaegen.be/antoon/python/page0.html
--
On Fri, Oct 14, 2005 at 09:55:46AM -0400, Dave Aitel wrote:
> Antoon Pardon wrote:
> >On Fri, Oct 14, 2005 at 08:28:46AM -0400, Dave Aitel wrote:
> >
> >>Make sure you're not on debian using the 2.6 kernel - their threading
> >>library is totally hosed, a
p I
> imagine)
Switching back to the 2.4 kernel indeed seems to solve the problem.
--
Antoon Pardon
___
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
In experimenting with threads I found that a combination of
gobject.source_remove and gobject.idle_add can freeze the
application.
The program below will freeze on my machine if it is running
long enough. It does seem very sensitive to the sleeptime
value. Increasing that to 0.01 makes it less li
cific number of
times and wait. But I didn't see any possibility
to include the program and the module on the
report pages.
So how do I best report this bug?
I'm using python 2.4 and pygtk 2.6.2 and tried
pygtk 2.6.3 too.
--
Antoon Pardon
___
pyg
waiting to happen? I just thought I'd ask
> in case I can save a headache or two down the road :)
pipes, don't get closed implicitely because they are essential just
integers. If you want implicit closing, you have to turn the pipe
fd's into files with the os.fdopen call.
--
An
pangocairo
I get:
Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pangocairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found
Anyone an idea about what I could try?
--
Antoon Pardon
efine PYGTK_MAJOR_VERSION 2
#define PYGTK_MICRO_VERSION 4
#define PYGTK_MINOR_VERSION 7
#define STDC_HEADERS 1
#define VERSION "2.7.4"
#endif
#ifdef __cplusplus
extern "C" void std::exit (int) throw (); using std::exit;
configure: exit 1
Anybody an idea how to solve this?
--
A
s_thread, (None, None))
>gtk.gdk.threads_leave()
You don't have to punt the gtk.gdk.threads_enter and
gtk.gdk.threads_leave call around the launch of a new
thread, but around the gdk (and gtk) calls in your
threads.
--
Antoon Pardon
___
pygtk mailing
sive.
I'm now writing a tube module to solve this. A Tube is like a Queue
but a thread has to open a tube before it can put or get things
on a tube and if all writers closed the tube a read from an empty
tube will generate an exception. But most off all there is a
tube_add_watch call which will monitor the tube like io_add_watch
monitors a pipe or network connection..
--
Antoon Pardon
___
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
On Fri, Jun 17, 2005 at 11:07:04AM -0400, Chris Lambacher wrote:
> On 6/17/05, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> > > Think of event handlers as being in the context of main, but when main
> > > is not doing anything it does not make any sense to continue to
On Thu, Jun 16, 2005 at 01:36:15PM -0400, Chris Lambacher wrote:
> On 6/16/05, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> > On Sun, Jun 12, 2005 at 10:19:03PM -0400, John K Luebs wrote:
> > > >
> > > > Now marking the gtk.main() as such a critical section wo
On Sun, Jun 12, 2005 at 10:19:03PM -0400, John K Luebs wrote:
> On Wed, Jun 08, 2005 at 01:53:37PM +0200, Antoon Pardon wrote:
> >
> > | John K. Luebs reminds you: *don't forget gtk.threads_enter() and
> > | gtk.threads_leave()* around mainloop when accessing gtk c
On Thu, Jun 09, 2005 at 02:23:18PM +0100, Gustavo J. A. M. Carneiro wrote:
> On Thu, 2005-06-09 at 15:11 +0200, Antoon Pardon wrote:
> >
> > I am working with a Debian testing system with a 2.4.27-2-686
> > kernel. libgtk 2.6.4-3, python 2.3.5-2, python-gtk2 2.6.2-1
>
>
I wanted to try out a new idea about doing threads with pygtk.
While experimenting a bit it seems I stumbled upon a bug in
pygtk. I have a number of equivallent threads who all produce
some kind of result which they then put on a canvas.
The method they use is like this:
def Adjust(self, Thr
On Wed, Jun 08, 2005 at 02:22:31PM +0200, Vincent Bernat wrote:
> OoO Peu avant le début de l'après-midi du mercredi 08 juin 2005, vers
> 13:53, Antoon Pardon <[EMAIL PROTECTED]> disait:
>
> > | John K. Luebs reminds you: *don't forget gtk.threads_enter() and
&g
at seems less than usefull.
--
Antoon Pardon
___
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
).
--
Antoon Pardon
___
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
and
other unix variants. But I have only tried it once and that was
with a very small test program. If you want more I have a number
of demo programs that shouldn't be difficult to adapt for testing
this out. Maybe I can find some time this week.
> Is it dfficult/not advisable?
Just
On Fri, Apr 01, 2005 at 12:52:21PM -0500, John Ehresman wrote:
> Antoon Pardon wrote:
> >>>However when I remove the gtk.threads_leave() and gtk.threads_enter()
> >>>calls from my program after sometime the program crashes and I get the
> >>>following mess
r code can become very unresponsive in particular
circumstances. AFAICS you have no saveguard against multiple threads
producing data more rapidly than the gtk-thread can handle.
My experience is that when that happens, resons suffers.
--
Antoon Pardon
_
On Thu, Mar 31, 2005 at 02:47:22PM +0300, Nikos Kouremenos wrote:
> On Thu, 31 Mar 2005 13:37:06 +0200, Antoon Pardon
> <[EMAIL PROTECTED]> wrote:
> >
> > That is the error I get.
> >
> > First some background.
> >
> > http://www.pygtk.org/pyg
after sometime the program crashes and I get the
following message:
Xlib: unexpected async reply (sequence 0x10e6b)!
Now I'm wondering. Is this a bug in pygtk or is the documentation not
accurate? I'm using python 2.3.5 and pygtk 2.6.1 on a Debian testing
machine.
--
Ant
On Mon, Jan 24, 2005 at 11:59:45AM +0100, Rafael Villar Burke wrote:
> Antoon Pardon wrote:
>
> >Well it's not a matter of doing my self a favor but a matter of correct
> >information and a matter of pygtk not making things more complicated as
> >they should.
>
are called in the gtk thread any how.
So although I think the current behaviour should be corrected,
it seems such a minor issue for me that I can't be bothered
to register to an other mailing list to argue the points.
--
Antoon Pardon
___
pygtk ma
ecause otherwise the program
would blok when I wanted to end it.
So in the end embedding signal handlers between a gtk.threads_enter
and get.threads_leave pair in general make things more difficult
instead of making them easier so I think progr
()
> gtk.gdk.threads_enter()
> gtk.main()
> gtk.gdk.threads_leave()
Are you sure? I see no need for the gtk.gdk.threads_enter()
and gtk.gdk.threads_leave() here. Or is this specific for
windows?
--
Antoon Pardon
___
pygtk mailing list pygtk
eads_leave() function
pair. My experience is that this embedding does little good but can be
a serious pain in the bud, often enough being the cause of a deadlock.
(*) With much thanks and appreciation to John Finlay
who has done a marvelous job.
--
Ant
e the same datastructures in components
that don't use a GUI. If I choose for this first option,
should I also seperate the config file in two?
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
rting to windows, I would really appreciate it
if you could test this program under windows and report on how it
behaves. The program was written with various remarks about windows and
threading in mind, so it should work, unfortunatly I don't have a window
mach
read could sleep for a time t, process items until the queue is
> empty and sleep again. Increasing t increases latency but also
> efficiency, covering the spectrum between busy waiting and a very
> high probability of finding something in the queue.
But that doesn't help if your
or want the main thread only to examine the
queue when it is not empty.
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
reads_enter()
> mlist.run()
> gtk.threads_leave()
> print "leave"
Well one thing you are doing wrong is calling
your thread by the run method. If you want to
launch a new thread you should use the start
method.
> app=appgui()
> gtk.thre
On Wed, Sep 29, 2004 at 03:00:46PM -0300, Guilherme Salgado wrote:
> On Wed, 2004-09-29 at 08:19, Antoon Pardon wrote:
> > On Wed, Sep 29, 2004 at 11:16:19AM +0100, Gustavo J. A. M. Carneiro wrote:
> > > Qua, 2004-09-29 às 12:05 +0200, Antoon Pardon escreveu:
> > >
&
On Wed, Sep 29, 2004 at 11:16:19AM +0100, Gustavo J. A. M. Carneiro wrote:
> Qua, 2004-09-29 às 12:05 +0200, Antoon Pardon escreveu:
>
> >
> > I'm running Debian Sarge with python 2.3.4 and python-gtk2 2.2.0
> > So pygtk 2.2.0 is in /usr/lib and pygtk 2.3.97 is in /u
ion.
I'm running Debian Sarge with python 2.3.4 and python-gtk2 2.2.0
So pygtk 2.2.0 is in /usr/lib and pygtk 2.3.97 is in /usr/local/lib
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
On Tue, Aug 17, 2004 at 11:59:00PM +0100, Gustavo J. A. M. Carneiro wrote:
> A Ter, 2004-08-17 às 18:06, Fernando Perez escreveu:
>
> > The attached code works fairly well for most purposes, but I'm having problems
> > with certain calls made by os.system(), specifically to gv (under Linux,
> >
reason.
>
> I am a complete ignoramus on threading issues, and this code was blindly
> copied from the above recipe, so I may well be just doing something very
> stupid. I would be very appreciative of any help on this.
Well personnaly I would have never done it this way.
I t
On Wed, Jun 23, 2004 at 11:05:03AM +, Tiago Cogumbreiro wrote:
> I for one would like to see them :) A threading tutorial is always nice.
> Making demos out of the most common concurrent patterns would also be
> interesting.
This is the method I finally settled on for handling threads in
pygtk
On Wed, Jun 23, 2004 at 11:05:03AM +, Tiago Cogumbreiro wrote:
> I for one would like to see them :) A threading tutorial is always nice.
> Making demos out of the most common concurrent patterns would also be
> interesting.
All rigt here below is my first version of a multi-threaded pygtk
pro
return 1
>"""
>#print "Clearing queue"
>#clear this...TODO: add select call here.
>newconn,addr=self.listensocket.accept()
>for i in self.myqueue:
>(command,args)=i
>self.gui.h
emo's. Do demo programs need to follow some guide lines?
Does someone has some place to put them? Can I put them on
the list? Maybe someone else can give them a look over
since I consider my self a gtk-newbee, so maybe somethings
I do could be done better?
--
Antoon Pardon
_
Is there some way to know how many functions are ready to
be executed the next idle time?
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
somekind of introdutionary
text would be appreaciated.
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
's bug too. If a bug in the python code triggers a
segmentation violation, then I consider that a bug either
in the python interpreter or the module used.
That a bug is only triggered by buggy code, doesn't
make it a non-bug.
--
Antoon Pardon
___
On Sun, Feb 08, 2004 at 11:20:49PM -0500, John K Luebs wrote:
> On Sun, Feb 08, 2004 at 12:59:44PM -0800, Jeff Bowden wrote:
> > Antoon Pardon wrote:
> > >
> > >My idea to handle this would be to create a new signal. Have a handler
> > >for this signal in the gu
no idea if
> gtk.input_add on Windows will accept and work with a pipe endpoint. I
> don't have a windows machine here to test it out on. Does anyone know
> about this?
My idea to handle this would be to create a new signal. Have a handler
for this signal in the gui thread and let the background task emit this
signal. Would this be workable? On Windows?
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
information
| required in drawing. The attributes of a gtk.gdk.GC are:
I would change
gc = widget.window.new_gc(...
to
gc = drawable.new_gc(...
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo
On Mon, Jan 19, 2004 at 03:05:26PM -0200, Christian Robottom Reis wrote:
> On Mon, Jan 19, 2004 at 09:55:34AM +0100, Antoon Pardon wrote:
> > > At any rate, it's trivial to write a wrapper class in Python that
> > > proxies all calls to the GdkWindow; that is however le
On Fri, Jan 16, 2004 at 03:33:12PM -0200, Christian Robottom Reis wrote:
> On Fri, Jan 16, 2004 at 04:41:22PM +0100, Antoon Pardon wrote:
> > I have just written my first application with a
> > gtk.DrawingArea. Can someone explain why I have to
> > do anything usefull wit
= gtk.DrawingArea()
...
gc = DA.window.new_gc()
DA.window.draw_point(gc , x , y)
The way it is done now just seems to
complicate things whithout good
reason.
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
On Mon, Oct 27, 2003 at 10:26:01AM -0200, Christian Robottom Reis wrote:
> On Mon, Oct 27, 2003 at 10:30:30AM +0100, Antoon Pardon wrote:
> > Well I looked a the FAQ, but my problem is that the
> > FAQ seems to be inconsistent with the documentation
> > at http://www.gnome.
gboolean.
Then to add to the confusion I browsed through a gtk2 program lately
where the argument to the map.alloc_color are three numbers, which
differs from both the FAQ and the documentation.
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http
my system. Which is Debian with python 2.2 and gtk 1.99.16
I hope it works for you too.
> except :
> print "error"
>
> for i in lines[:-1]:
> print i
> return 0
>
> if __name__ =="__main__":
>
> main()
>
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
t one widget in which I draw al
elements as they should be, but this would be a little harder to
code.
So what are your ideas? Shouldn't I worry about having thousand
of widgets? Is there some kind of limit I should stay under?
Is there an other approach I didn''t think of
that is off my chest, I'll continue with
my struggles. In any case thanks to the people who
answered my previous message.
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ:
On Wed, Mar 26, 2003 at 08:02:16PM +0800, James Henstridge wrote:
> Antoon Pardon wrote:
>
> >Explain the difference between signals and events.
> >As far I as a complete newbie understand the two are
> >extremely similar to the point there is no reason
> >to have
fusing to have them
both without explanation about why having them both.
How to use multiple thread with PyGTK
Document what is still undocumented in this tutorial.
--
Antoon Pardon
___
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinf
70 matches
Mail list logo