Re: [pygtk] thread support on windows ?
Ionutz Borcoman wrote: Thanx. My example worked with this small modification: if __name__ == "__main__": gtk.threads_init() gtk.threads_enter() test = Test() test.main() gtk.threads_leave() Nothing else needed. Cool. I was also been able to do what I've wanted with the idle event and no threads. Now I am wondering what's better to use: idle events or threads ? Any recommendations ? It depends on what you need to do, and on what you are comfortable using. Threads are good if what you are doing is going to take a long time and can't be divided up into small chunks that can be executed in an idle callback. Even if something can be done in multiple idle handlers I find that it is *sometimes* easier to use a separate thread. The primary disadvantage of threads is that synchronisation problems and race conditions can get very complex if you aren't careful. Use Python's 'Queue' module for everything; if your algorithm requires something more complicated than Queue then change your algorithm ;-) -- Tim Evans Applied Research Associates NZ http://www.aranz.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] ImportError: _gtk
Cedric Thanks for the reply | 1. We suppose we have the dropline GTK+ runtime correctly installed |with your PATH modified accordingly. Download from http://www.dropline.net/gtk/ Installed in . K:\Proc\GTK\2.0 Paths to . K:\Proc\GTK\2.0\bin K:\Proc\GTK\2.0\lib are set in autoexec.bat via set path statements | Try this helloworld executable from the official GTK+ tutorial | | http://www.pcpm.ucl.ac.be/~gustin/win32_ports/binaries/helloworld.zip | | Is it working ? | No But it displays two message boxes that may provide some clues This box is on top -- Error Starting Program -- [ ! ] The INTL.DLL file is linked to missing export INCONV.DLL:libconv_set_relocation_prefix [ OK ] --- The above mentioned intl.dll file is in K:\Proc\GTK\2.0\lib However, I do NOT find inconv.dll on my system anywhere The is the 2nd message box displayed underneath the 1st from helloworld.exe and shows a similar message to the one that I get when attempting to import gtk from Python --- K:\Python\py_Work\GUI\PyGTK\helloworld.exe --- ( X } A device attached to the system is not functioning [ OK ] -- Stanley C. Kitching Human Being Phoenix, Arizona ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] TreeView, Windows Look & Feel
On Fri, Jan 02, 2004 at 09:40:58AM +0800, Bert Marco Schuldes wrote: > Icons and especially visible lines connecting > the nodes of the tree. I think that's what this RFE is about: http://bugzilla.gnome.org/show_bug.cgi?id=106406 But there seems to be some confusion there between grid lines as in a spreadsheat and connecting lines between tree nodes. I'm pretty sure the lines aren't possible. Depending on the nodes in your tree, using different pixmaps at each level on the tree may help users to figure out where they are in the tree. See the FAQ for some examples. Dave Cook ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] TreeView, Windows Look & Feel
On Mon, 05 Jan 2004 18:02:25 +0800 Bert Marco Schuldes <[EMAIL PROTECTED]> wrote: > > Note that Windows XP (with its new theme at least) does not display > > display lines connecting the nodes of the tree. It does still use > > [+] and [-] expanders. > So with WIN2K. Any chance, to add the lines myself some easy way, > I mean without rewriting the whole TreeView ;-) ? You should try with pixmaps cell-renderers. But it's not so easy. -- |\ | |HomePage : http://nem01.altervista.org | \|emesis |XPN (my nr): http://xpn.altervista.org ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] TreeView, Windows Look & Feel
Tim Evans wrote: > Note that Windows XP (with its new theme at least) does not display > display lines connecting the nodes of the tree. It does still use [+] > and [-] expanders. So with WIN2K. Any chance, to add the lines myself some easy way, I mean without rewriting the whole TreeView ;-) ? Bert. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] thread support on windows ?
Tim Evans wrote: Ionutz Borcoman wrote: Hi, I am trying to use threads and PyGTK together (under M$ Windows) with no success. I have attached the small program to this e-mail. Am I doing something wrong ? Or is the pygtk not working with threads on M$Win ? I have python 2.3.2, pytgk 2.0.0 and gtk 2.2.4.1. TIA, Ionutz You need to call gtk.threads_init() and gtk.threads_enter() at the start of your program, and then call gtk.threads_leave() at the end (after gtk.main()). See here for more information: http://developer.gnome.org/doc/API/2.0/gdk/gdk-Threads.html Thanx. My example worked with this small modification: if __name__ == "__main__": gtk.threads_init() gtk.threads_enter() test = Test() test.main() gtk.threads_leave() Nothing else needed. Cool. I was also been able to do what I've wanted with the idle event and no threads. Now I am wondering what's better to use: idle events or threads ? Any recommendations ? Ionutz ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/