Re: [pygtk] Windows all in one bundle broken?
I never got around to this. I Just removed the Manifest file and it works. kinda. Crashes now and again, though. On Mon, Jul 25, 2011 at 12:40 PM, Dieter Verfaillie diet...@optionexplicit.be wrote: On 25/07/2011 21:29, Mathew Yeates wrote: hmmm. I already have VS 2008 (Express) but it's not the version you want. Uninstall and reinstall? No need to uninstall Visual Studio. Simply try the (exact version of the) C++ Redistributable linked below... mvg, Dieter [2] http://www.microsoft.com/download/en/details.aspx?displaylang=enid=29 ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Windows all in one bundle broken?
I tried downloading vs2008 redistributable (pretty sure it's the version you wanted) but I still get the error. How can I check I have the right version number? On Fri, Jul 29, 2011 at 11:07 AM, Mathew Yeates mat.yea...@gmail.com wrote: I never got around to this. I Just removed the Manifest file and it works. kinda. Crashes now and again, though. On Mon, Jul 25, 2011 at 12:40 PM, Dieter Verfaillie diet...@optionexplicit.be wrote: On 25/07/2011 21:29, Mathew Yeates wrote: hmmm. I already have VS 2008 (Express) but it's not the version you want. Uninstall and reinstall? No need to uninstall Visual Studio. Simply try the (exact version of the) C++ Redistributable linked below... mvg, Dieter [2] http://www.microsoft.com/download/en/details.aspx?displaylang=enid=29 ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Windows all in one bundle broken?
yep. I found it. It's installed. On Fri, Jul 29, 2011 at 11:57 AM, Dieter Verfaillie diet...@optionexplicit.be wrote: On 29/07/2011 20:33, Mathew Yeates wrote: I tried downloading vs2008 redistributable (pretty sure it's the version you wanted) but I still get the error. How can I check I have the right version number? On Windows XP (32 bit) the crt is installed into C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375 That last directory name has the version number embedded into it's name (9.0.21022.8). It is OK to have multiple versions installed at the same time, as long as this one is present. If you see that, it should work. If it still doesn't work then I don't know what could be the problem. Ugh, sucks I still haven't got access to a 64 bit Windows machine... mvg, Dieter ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Windows all in one bundle broken?
I sent you the attachment. Something weird. Running http://www.optionexplicit.be/projects/gnome-windows/20110405 under depends.exe also produces the same output. But when I run it from the command line, all is well. ? On Sat, Jul 23, 2011 at 10:08 AM, Dieter Verfaillie diet...@optionexplicit.be wrote: On 22/07/2011 22:34, Mathew Yeates wrote: We'll need a bit more information to be able to help you: 1) How do you execute glade-3.exe? Via the shortcut the installer created in the start menu or some other method? No item was added to the Start Menu. Glade-3.6 is still shown though. Should I uninstall the old Glade? That's strange. There should be an entry like this: https://github.com/dieterv/pygtk-installer/wiki/screenshots/2.22.4/5-programmenu.png 2) What does your PATH environment variable look like? open a Command Prompt aka cmd.exe and execute echo %PATH% It's pretty long. I'll post it last Here is my path C:\l1b\src\l1b32\Debug;c:\Python27;C:\Python26\Lib\site-packages\PyQt4;C:\WINDOW S\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program Files (x86)\SlikSvn\bi n\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Mercurial;C:\Pyt hon25\DLLs;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files (x86)\Ration al\common;c:\Python27;C:\Python-2.7.1\PC\VS7.1;C:\l1b\src\l1b32\Debug;c:\Python2 7;C:\Python26\Lib\site-packages\PyQt4;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\ system32\WBEM;C:\Program Files (x86)\SlikSvn\bin\;c:\Program Files (x86)\Microso ft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DT S\Binn\;C:\Program Files (x86)\Mercurial;C:\Python25\DLLs;C:\Program Files (x86) \GTK2-Runtime\bin;C:\Program Files (x86)\IBM\RationalPurifyPlus\Common;C:\l1b\sr c\l1b32\Debug;c:\g77\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;c:\python27 ;c:\python26;C:\Python25;C:\Python25\Scripts;C:\Program Files (x86)\Gtk+\bin;C:\ Program Files (x86)\CVSNT\;C:\abs\bin;C:\Program Files (x86)\GIMP-2.0\bin Don't see anything too weird in there. 3) Where is Python 2.7 installed? c:\Python27 4) Assuming Python 2.7 is installed in C:\Python27, does C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin actually contain glade-3.exe? yes. 5) Open the attached clean.py script in your favorite text editor and edit the paths on line 7 and 8 to correspond to the values applicable on your system. Then run the script. Does the script output any values? Nope. btw, I run glade by typing .\glade-3.exe in the directory C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin producing The system cannot execute the specified program. Looks good. Next step: - launch a Command Prompt (aka cmd.exe) - start depends.exe [1] from the Command Prompt, for example type C:\depends.exe and then hit the return or enter key - FileOpenC:\Python27\Lib\site-packages\gtk-2.0\runtime\bin\glade-3.exe - hit F7 - check all the checkboxes - click OK - Glade now starts. And will crash like you've described above - Back in Dependency Walker click FileSave As...glade-3.dwi - Upload the (compressed!) glade-3.dwi file somewhere and let us know where we can get it or mail the file directly to me (don't try to post it on the mailinglist, you message will be rejected due to the attachment being too big...) mvg, Dieter [1] http://www.dependencywalker.com/depends22_x86.zip ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Windows all in one bundle broken?
hmmm. I already have VS 2008 (Express) but it's not the version you want. Uninstall and reinstall? -Mathew On Mon, Jul 25, 2011 at 7:05 PM, Dieter Verfaillie diet...@optionexplicit.be wrote: On 25/07/2011 19:28, Dieter Verfaillie wrote: The glade-3.dwi file you've sent tells me all .dll files loaded from c:\windows\system32 (kernel32, ntdll, msvcrt, advapi32, etc) are 64 bit images. That can't be right? Are you sure you're using the x86 version of dependency walker? For those following on the list: I've received the .dwi file written by the x86 version of depends.exe. Had a look at it and it seems your windows installation is having a problem with the glade-3.exe.manifest file included with the Glade component of the PyGTK All-in-one installer. I think that means your system is missing a shared installation of the Microsoft.VC90.CRT version 9.0.21022.8. Here's in detail what I think is happening: - the glade-3 version distributed with the aio installer is built with Python widgets support. That means there's a C:\Python27\Lib\site-packages\gtk-2.0\runtime\lib\glade3\modules\libgladepython.dll - when this version of glade-3.exe is started, the above libgladepython.dll is loaded - and libgladepython.dll is loading pyton27.dll - python27.dll depends on a specific version of a CRT: msvcr90.dll (version 9.0.21022.8). - but because python27.dll is not being loaded through python(w).exe the copies of msvcr90.dll and Microsoft.VC90.CRT.manifest that live right next to python(w).exe in C:\Python27 are not used. Because of that, a shared copy is searched and when not found you get the error you are seeing (I think). This also explains why the glade3-bundle from [1], when extracted to for example C:\glade works fine out of the box: there is no Python dependency in that configuration of Glade, thus by definition no need for a glade-3.exe.manifest file and no dependency on msvcr90.dll (in other words, that version depends purely on msvcrt.dll). Could you try installing the Microsoft Visual C++ 2008 Redistributable Package (x86) [2], reboot and see what happens? Also, don't be tempted by the link to the SP1 version on that page, you need exactly version 9.0.21022.8 ! mvg, Dieter [1] http://www.optionexplicit.be/projects/gnome-windows/20110405 [2] http://www.microsoft.com/download/en/details.aspx?displaylang=enid=29 ps Uh, this is why it's called DLL Hell... ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Windows all in one bundle broken?
We'll need a bit more information to be able to help you: 1) How do you execute glade-3.exe? Via the shortcut the installer created in the start menu or some other method? No item was added to the Start Menu. Glade-3.6 is still shown though. Should I uninstall the old Glade? 2) What does your PATH environment variable look like? open a Command Prompt aka cmd.exe and execute echo %PATH% It's pretty long. I'll post it last 3) Where is Python 2.7 installed? c:\Python27 4) Assuming Python 2.7 is installed in C:\Python27, does C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin actually contain glade-3.exe? yes. 5) Open the attached clean.py script in your favorite text editor and edit the paths on line 7 and 8 to correspond to the values applicable on your system. Then run the script. Does the script output any values? Nope. btw, I run glade by typing .\glade-3.exe in the directory C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin producing The system cannot execute the specified program. Here is my path C:\l1b\src\l1b32\Debug;c:\Python27;C:\Python26\Lib\site-packages\PyQt4;C:\WINDOW S\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program Files (x86)\SlikSvn\bi n\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Mercurial;C:\Pyt hon25\DLLs;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files (x86)\Ration al\common;c:\Python27;C:\Python-2.7.1\PC\VS7.1;C:\l1b\src\l1b32\Debug;c:\Python2 7;C:\Python26\Lib\site-packages\PyQt4;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\ system32\WBEM;C:\Program Files (x86)\SlikSvn\bin\;c:\Program Files (x86)\Microso ft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DT S\Binn\;C:\Program Files (x86)\Mercurial;C:\Python25\DLLs;C:\Program Files (x86) \GTK2-Runtime\bin;C:\Program Files (x86)\IBM\RationalPurifyPlus\Common;C:\l1b\sr c\l1b32\Debug;c:\g77\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;c:\python27 ;c:\python26;C:\Python25;C:\Python25\Scripts;C:\Program Files (x86)\Gtk+\bin;C:\ Program Files (x86)\CVSNT\;C:\abs\bin;C:\Program Files (x86)\GIMP-2.0\bin mvg, Dieter This message was sent using IMP, the Internet Messaging Program. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Windows all in one bundle broken?
more: I uninstalled an old pygtk and an old gtk+ runtime. Then I reinstalled the microbundle. Now I am seeing pygtk and glade in the start menu. I still get the same error. I ran Sysinternals Procmon and it didn't show much of anything. btw, I am on a 64 bit machine with a Xeon CPU. On Fri, Jul 22, 2011 at 8:34 PM, Mathew Yeates mat.yea...@gmail.com wrote: We'll need a bit more information to be able to help you: 1) How do you execute glade-3.exe? Via the shortcut the installer created in the start menu or some other method? No item was added to the Start Menu. Glade-3.6 is still shown though. Should I uninstall the old Glade? 2) What does your PATH environment variable look like? open a Command Prompt aka cmd.exe and execute echo %PATH% It's pretty long. I'll post it last 3) Where is Python 2.7 installed? c:\Python27 4) Assuming Python 2.7 is installed in C:\Python27, does C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin actually contain glade-3.exe? yes. 5) Open the attached clean.py script in your favorite text editor and edit the paths on line 7 and 8 to correspond to the values applicable on your system. Then run the script. Does the script output any values? Nope. btw, I run glade by typing .\glade-3.exe in the directory C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin producing The system cannot execute the specified program. Here is my path C:\l1b\src\l1b32\Debug;c:\Python27;C:\Python26\Lib\site-packages\PyQt4;C:\WINDOW S\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program Files (x86)\SlikSvn\bi n\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Mercurial;C:\Pyt hon25\DLLs;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files (x86)\Ration al\common;c:\Python27;C:\Python-2.7.1\PC\VS7.1;C:\l1b\src\l1b32\Debug;c:\Python2 7;C:\Python26\Lib\site-packages\PyQt4;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\ system32\WBEM;C:\Program Files (x86)\SlikSvn\bin\;c:\Program Files (x86)\Microso ft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DT S\Binn\;C:\Program Files (x86)\Mercurial;C:\Python25\DLLs;C:\Program Files (x86) \GTK2-Runtime\bin;C:\Program Files (x86)\IBM\RationalPurifyPlus\Common;C:\l1b\sr c\l1b32\Debug;c:\g77\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;c:\python27 ;c:\python26;C:\Python25;C:\Python25\Scripts;C:\Program Files (x86)\Gtk+\bin;C:\ Program Files (x86)\CVSNT\;C:\abs\bin;C:\Program Files (x86)\GIMP-2.0\bin mvg, Dieter This message was sent using IMP, the Internet Messaging Program. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Windows all in one bundle broken?
more: blade-3.8 at http://www.optionexplicit.be/projects/gnome-windows/20110405/ works! On Fri, Jul 22, 2011 at 9:27 PM, Mathew Yeates mat.yea...@gmail.com wrote: more: I uninstalled an old pygtk and an old gtk+ runtime. Then I reinstalled the microbundle. Now I am seeing pygtk and glade in the start menu. I still get the same error. I ran Sysinternals Procmon and it didn't show much of anything. btw, I am on a 64 bit machine with a Xeon CPU. On Fri, Jul 22, 2011 at 8:34 PM, Mathew Yeates mat.yea...@gmail.com wrote: We'll need a bit more information to be able to help you: 1) How do you execute glade-3.exe? Via the shortcut the installer created in the start menu or some other method? No item was added to the Start Menu. Glade-3.6 is still shown though. Should I uninstall the old Glade? 2) What does your PATH environment variable look like? open a Command Prompt aka cmd.exe and execute echo %PATH% It's pretty long. I'll post it last 3) Where is Python 2.7 installed? c:\Python27 4) Assuming Python 2.7 is installed in C:\Python27, does C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin actually contain glade-3.exe? yes. 5) Open the attached clean.py script in your favorite text editor and edit the paths on line 7 and 8 to correspond to the values applicable on your system. Then run the script. Does the script output any values? Nope. btw, I run glade by typing .\glade-3.exe in the directory C:\Python27\Lib\site-packages\gtk-2.0\runtime\bin producing The system cannot execute the specified program. Here is my path C:\l1b\src\l1b32\Debug;c:\Python27;C:\Python26\Lib\site-packages\PyQt4;C:\WINDOW S\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program Files (x86)\SlikSvn\bi n\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Mercurial;C:\Pyt hon25\DLLs;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files (x86)\Ration al\common;c:\Python27;C:\Python-2.7.1\PC\VS7.1;C:\l1b\src\l1b32\Debug;c:\Python2 7;C:\Python26\Lib\site-packages\PyQt4;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\ system32\WBEM;C:\Program Files (x86)\SlikSvn\bin\;c:\Program Files (x86)\Microso ft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DT S\Binn\;C:\Program Files (x86)\Mercurial;C:\Python25\DLLs;C:\Program Files (x86) \GTK2-Runtime\bin;C:\Program Files (x86)\IBM\RationalPurifyPlus\Common;C:\l1b\sr c\l1b32\Debug;c:\g77\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;c:\python27 ;c:\python26;C:\Python25;C:\Python25\Scripts;C:\Program Files (x86)\Gtk+\bin;C:\ Program Files (x86)\CVSNT\;C:\abs\bin;C:\Program Files (x86)\GIMP-2.0\bin mvg, Dieter This message was sent using IMP, the Internet Messaging Program. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
[pygtk] Windows all in one bundle broken?
Hi I just tried downloading pygtk-all-in-one-2.24.0.win32-py2.7.msi and glade-3.exe doesn't work. I get The system cannot execute the specified program.. This is on Windows XP. ??? -Mathew ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] can a treeview be reordered with a CellRendererToggle present
Here is an example import gtk class ListDisp: def __init__(self): self.builder = gtk.Builder() self.builder.add_from_file( drag.xml) self.window = self.builder.get_object(window1) self.store=gtk.ListStore('gboolean',str) #self.store=gtk.ListStore(str) self.view=self.builder.get_object(treeview1) self.view.set_model(self.store) self.tvcolumn = gtk.TreeViewColumn('File Name') self.view.append_column(self.tvcolumn) self.cell = gtk.CellRendererText() self.toggle=gtk.CellRendererToggle() self.tvcolumn.pack_start(self.toggle, True) self.tvcolumn.pack_start(self.cell, True) self.tvcolumn.add_attribute(self.cell, 'text', 1) self.tvcolumn.add_attribute(self.toggle, 'active', 0) self.view.set_reorderable(True) self.store.append([True,foo]) self.store.append([True,goo]) if __name__ == __main__: ld=ListDisp() ld.window.show_all() gtk.main() And here is the glade file ?xml version=1.0? interface requires lib=gtk+ version=2.16/ !-- interface-naming-policy project-wide -- object class=GtkWindow id=window1 child object class=GtkScrolledWindow id=scrolledwindow1 property name=visibleTrue/property property name=can_focusTrue/property property name=hscrollbar_policyautomatic/property property name=vscrollbar_policyautomatic/property child object class=GtkTreeView id=treeview1 property name=visibleTrue/property property name=can_focusTrue/property /object /child /object /child /object /interface On Tue, Feb 2, 2010 at 11:37 PM, Pietro Battiston too...@email.it wrote: Il giorno mar, 02/02/2010 alle 16.08 -0800, Yeates, Mathew C (388D) ha scritto: I have a CellRendererToggle and CellRendererToggle packed in a column and cannot reorder. However, if I don’t pack the CellRendererToggle then I can’t. Any clues or example code showing this? I humbly suggest that you rephrase your problem more clearly, perhaps providing a simple and running snippet exposing it. Pietro ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] can a treeview be reordered with a CellRendererToggle present
I want to be able to drag rows of my list. i.e. reorder the list On Wed, Feb 3, 2010 at 12:36 PM, Pietro Battiston too...@email.it wrote: Il giorno mer, 03/02/2010 alle 12.21 -0800, Mathew Yeates ha scritto: Here is an example And *what is the problem*?!? Your first email was not at all understandeable to me, and the second didn't help. I assume this must _certainly_ be because I'm not a native English speaker... still, many questions on this list don't even get answers, so if I was in you I would try to catch attention by _stating clearly your problem_. By the way, I also see it as a form of respect. Notice I _may_ possibly understand the problem by studying your code, but I expect that you explain it carefully, not that I must fight to get it. Pietro import gtk class ListDisp: def __init__(self): self.builder = gtk.Builder() self.builder.add_from_file( drag.xml) self.window = self.builder.get_object(window1) self.store=gtk.ListStore('gboolean',str) #self.store=gtk.ListStore(str) self.view=self.builder.get_object(treeview1) self.view.set_model(self.store) self.tvcolumn = gtk.TreeViewColumn('File Name') self.view.append_column(self.tvcolumn) self.cell = gtk.CellRendererText() self.toggle=gtk.CellRendererToggle() self.tvcolumn.pack_start(self.toggle, True) self.tvcolumn.pack_start(self.cell, True) self.tvcolumn.add_attribute(self.cell, 'text', 1) self.tvcolumn.add_attribute(self.toggle, 'active', 0) self.view.set_reorderable(True) self.store.append([True,foo]) self.store.append([True,goo]) if __name__ == __main__: ld=ListDisp() ld.window.show_all() gtk.main() And here is the glade file ?xml version=1.0? interface requires lib=gtk+ version=2.16/ !-- interface-naming-policy project-wide -- object class=GtkWindow id=window1 child object class=GtkScrolledWindow id=scrolledwindow1 property name=visibleTrue/property property name=can_focusTrue/property property name=hscrollbar_policyautomatic/property property name=vscrollbar_policyautomatic/property child object class=GtkTreeView id=treeview1 property name=visibleTrue/property property name=can_focusTrue/property /object /child /object /child /object /interface On Tue, Feb 2, 2010 at 11:37 PM, Pietro Battiston too...@email.it wrote: Il giorno mar, 02/02/2010 alle 16.08 -0800, Yeates, Mathew C (388D) ha scritto: I have a CellRendererToggle and CellRendererToggle packed in a column and cannot reorder. However, if I don’t pack the CellRendererToggle then I can’t. Any clues or example code showing this? I humbly suggest that you rephrase your problem more clearly, perhaps providing a simple and running snippet exposing it. Pietro ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
[pygtk] can't import gtk
I get the error AttributeError: 'module' object has no attribute 'CAPI' The only place I see CAPI is in _cairo.so. I've tried both pygtk-2.17.0 and pygtk-2.14.1. Is there some magic combination of pycairo, pygtk etc? Mathew ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] can't import gtk
here's a snippet. import gtk Thats it! I immediately get the error. On Mon, Jan 25, 2010 at 9:56 AM, Bertrand Son Kintanar b3rxkinta...@gmail.com wrote: On Mon, Jan 25, 2010 at 10:49 AM, Mathew Yeates mat.yea...@gmail.comwrote: I get the error AttributeError: 'module' object has no attribute 'CAPI' The only place I see CAPI is in _cairo.so. I've tried both pygtk-2.17.0 and pygtk-2.14.1. Is there some magic combination of pycairo, pygtk etc? Mathew please avoid creating multiple posts on the same issue. can we see a snippets of your code where this error spits out? -- b3rx ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] can't import gtk
Thanks John. I'm doing a Linux build. Is that bug discussion still relevant? -Mathew On Mon, Jan 25, 2010 at 11:43 AM, John Stowers john.stowers.li...@gmail.com wrote: On Mon, 2010-01-25 at 09:49 -0800, Mathew Yeates wrote: I get the error AttributeError: 'module' object has no attribute 'CAPI' The only place I see CAPI is in _cairo.so. I've tried both pygtk-2.17.0 and pygtk-2.14.1. Is there some magic combination of pycairo, pygtk etc? Please continue this discussion on the following bug https://bugzilla.gnome.org/show_bug.cgi?id=589671 Mathew ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
[pygtk] AttributeError: 'module' object has no attribute 'CAPI
Hi When I import gtk I get this error. It looks like this symbol is in cairo.so. ?? Mathew ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
[pygtk] glade failing on Wiin32
Hi I installed pygtk and a small program is failing. The line gtk.glade.XML ('pyglade.glade', window1) gives the error (python.exe:3440): libglade-CRITICAL **: glade_xml_build_interface: assertion `wid != NULL' failed I'm trying to figure out whats wrong. I'm wondering if there is a problem with my pygtk installation. I get a dialog box that says register for the following environments but my only choice is Cygwin. I think this might be a problem since python uses the msvc libs. Why doesn't the installer see that I have MSVC? Mathew ___ 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/
[pygtk] error compiling 2.12.10
I keep getting ./libglade.override:35: error: expected specifier-qualifier-list before 'GladeXML' ./libglade.override:40: error: expected specifier-qualifier-list before 'GladeXMLClass' Anybody know why? Mathew ___ 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/
[pygtk] problem generating diacanvas python wrappers
Hi, not sure if this is a pygtk problem or a diacanvas problem (I also posted to the diacanvas list). I have pygtk 1.99.13 installed and when I try and generate python wrappers for diacanvas I get into an infinite loop. --- (cd . \ /hsgi/mathew/root/bin/pygtk-codegen-2.0 \ --register diacanvas.defs \ --override diageometry.override \ --prefix pydiageometry diageometry.defs) gen-diageometry.c \ cp gen-diageometry.c diageometry.c \ rm -f gen-diageometry.c Traceback (most recent call last): File /hsgi/mathew/root/share/pygtk/2.0/codegen/codegen.py, line 772, in ? File /hsgi/mathew/root/share/pygtk/2.0/codegen/codegen.py, line 748, in main File /hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py, line 82, in startParsing File /hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py, line 86, in handle File /hsgi/mathew/root/share/pygtk/2.0/codegen/defsparser.py, line 16, in include File /hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py, line 82, in startParsing File /hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py, line 86, in handle File /hsgi/mathew/root/share/pygtk/2.0/codegen/defsparser.py, line 16, in include File /hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py, line 82, in startParsing File /hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py, line 86, in handle File /hsgi/mathew/root/share/pygtk/2.0/codegen/defsparser.py, line 16, in include File /hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py, line 82, in startParsing File /hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py, line 86, in handle etc,etc IOError: [Errno 24] Too many open files: 'diacanvascallbacks.defs' make: *** [diageometry.c] Error 1 - Does this look like a pygtk error or a diacanvas error?? Mathew -- _ |)` | | | |_ /(]__) /(]___) /(]___) ___(]_) / / ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] bug in 1.99.13 and fix
pygtk-codegen-2.0 will fail on a defs file which includes another empts defs file (this is the case for diacanvas). This is because scmexpr.parse() returns an empty tuple for the empty file and StartParsing in scmexpr.py will see no argument. This causes line 81 in scmexpr.py to be executed and the existing parse tree is fed to handle. This causes an infinite loop. Fix: in scmexpr.py change the beginning lines of StartParsing to if arg == (): tuples=() elif type(arg) == types.StringType: tuples = parse(open(arg)) Mathew -- _ |)` | | | |_ /(]__) /(]___) /(]___) ___(]_) / / ___ 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] gtkglarea and PyOpenGL
I do somethong like this GLarea = gtkgl.GtkGLArea((gtkgl.RGBA, gtkgl.DOUBLEBUFFER)) GLarea.set_events(0) GLarea.size(glx, gly) GLarea.show() GLarea.connect(expose_event, View.expose) GLarea.connect(configure_event,View.onconfig) #GLarea.connect(realize,View.realize) GLarea.connect(button_release_event,View.butrelease) GLarea.connect(motion_notify_event,View.butmot) #GLarea.connect(key_press_event,self.ebev) glViewport(newvx ,newvy , \ constants.glmaxwidth,constants.glmaxheight) After this, just make opengl calls. Also ... GLarea.swap_buffers() and GLarea.make_current() Hope that helps. Mathew Rajarshi Guha wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm writing some code that currently displays gif images of molecules. I would like to instead use OpenGL to render these images - I figure that I need GtkGLArea. But how does this relate to the PyOpenGL bindings? From the examples in the PyOpenGL package, it seems they use GLUT to manage windows and events etc. So what would be the procedeure to use OpenGL commands to output to the GtkGLArea I'd appreciate it if anybody could point me to some example code. Thanks, - -- - --- Rajarshi Guha | email: [EMAIL PROTECTED] 417 Davey Laboratory | web : http:// www.jijo.cjb.net Dept. Of Chemistry | ICQ : 123242928 Pennsylvania State University | AIM : LoverOfPanda - --- GPG Fingerprint: DCCB 4D1A 5A8B 2F5A B5F6 1F9E CDC4 5574 9017 AF2A Public Key : http://pgp.mit.edu/ - --- All science is either physics or stamp collecting. -- Ernest Rutherford -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9U+qQzcRVdJAXryoRAqHmAJ4xsV0aUnfbpCZLUbEQE5pVioVa1QCgx/SD XJcajWC8JDTDhsFZrySxltI= =a4+F -END PGP SIGNATURE- ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ 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] gtk theme switch
my 2 cents on the subject of theme switching: I have an application where I allow the user to switch themes while the app is running. (this is using gtk1.2.10) I do the following: 1) rc_clear_styles() 2) gtk.rc_parse('new gtkrc') 3) change the mod time of 'new gtkrc' #changing the mod time causes all entries in the hash table to be cleared 4)os.environ['GTK_RC_FILES']='new gtkrc' 5) gtk.rc_reparse_all() 6) for each widget w currently showing, w.reset_rc_styles() Works for me for every window except my main toplevel. Mathew Philippe Gendreau wrote: I'd really like to make that work... I settled for updating just the window theme (it's running full screen anyway). I could not find more information than what's in the pygtk tutorial (rc_parse('rc file')). I'd really appreciate it if someone could point me in the direction of some docs or programs that make use of this kind of stuff. My main question now is: How do I update the application theme for all present and future widgets? Thanks again. -- Philippe Gendreau ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ 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] Help with adding a new function
Thx James. That handles this specific case. But, I'd also like to do it for other functions to. Mathew James Henstridge wrote: Mathew Yeates wrote: Hi, I've looked at how draw_rgb is implemented and I'd like to create a similar function which passes a Numeric array. Rather than modify the pygtk code (which I've done in the past), I'd like to have my own code outside the gnome-python source tree. There is already a draw_array() variant that can take Numeric Python arrays (only compiled if Numeric Python was found when pygtk was building). It takes an NxM, NxMx1, NxMx3 or NxMx4 unsigned byte array and renders it to the drawable. (I haven't ported this to the pygtk2 tree yet though). James. ___ 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] canvas item callbacks
I just went and looked at my code (its a plugin for SciGraphica). I DO NOT define NO_IMPORT and this causes your missing symbol to be defined in pygtk.h. As for init_pygtk, I never call it! But I'm importing gtk prior to loading my module. Mathew We are creating a shared library, with -shared. Python still won't load a shared library with an undefined symbol in it. Are we doing something dumb? The C++ code contains #define NO_IMPORT_PYGTK #include pygtk.h #undef NO_IMPORT_PYGTK and (later, within a canvas item callback) PyGtk_BlockThreads(); PyObject *result = PyEval_CallObject(pycallback, args); PyGtk_UnblockThreads(); When compiled into a shared library, python says ImportError: /u/home3/langer/FE/OOF2/INTEL/oofcppcmodule.so: undefined symbol: _PyGtk_API If I add my own pointer to _PyGtk_API and call the (slightly modified) init_pygtk macro, then it all works. As I said, this feels wrong to me. It looks like there's no harm in calling init_pygtk an extra time, but I'd rather not have to copy names like _PyGtk_API out of the nominally private parts of the header file... -- Steve -- /* EMail: [EMAIL PROTECTED] -- Phone: (301) 975-5423 -- -- WWW: http://math.nist.gov/~SLanger/ Fax: (301) 990-4127 -- -- Mail: NIST; 100 Bureau Drive -- Stop 8910; Gaithersburg, MD 20899-8910 */ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ 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] canvas item callbacks
I'm going to make a wild ass guess here. Have you tried inserting the macros to block threads? Can't remember exactly what they are but I've seen tons of examples in the pygtk code. Mathew I'm encountering some strange behavior and hope someone on this list can provide some insight. We're using pygtk 0.6.8 with python 2.1, and gtk-canvas 0.1. We're using the gtk-canvas instead of gnome-canvas so that our users don't have to install all of gnome. A disadvantage of that is that we have to create our own python wrappers for the canvas functions. Everything was fine until I tried to extract mouse click coordinates. Here's what happens. There's a C++ class, OOFCanvas, that wraps the gtk-canvas. It has a set_callback() function which looks like this: void OOFCanvas::set_callback(PyObject *callback) { pycallback = callback; // pycallback is OOFCanvas instance data Py_XINCREF(callback); gtk_signal_connect(GTK_OBJECT(root), // root is the gtk_canvas_root event, GTK_SIGNAL_FUNC(OOFCanvas::mouse_event), this); } set_callback() is SWIGged, and I know that its argument is being handled correctly, since I can call the callback under other circumstances. (The SWIG typemap uses PyCallable_Check to verify that the argument is sane.) When the canvas gets an event, it calls the static function OOFCanvas::mouse_event, which just calls a non-static function: gint OOFCanvas::mouse_event(GtkCanvasItem *item, GdkEvent *event, gpointer data) { OOFCanvas *oofcanvas = (OOFCanvas*)(data); oofcanvas-mouse_eventCB(item, event); return TRUE; } That non-static function invokes the Python callback: void OOFCanvas::mouse_eventCB(GtkCanvasItem *item, GdkEvent *event) { PyObject *args = 0; switch(event-type) { case GDK_MOTION_NOTIFY: args = Py_BuildValue((sdd), motion_notify, event-motion.x, event-motion.y); break; // [ several other event types omitted ] } if(args) { PyObject *result = PyEval_CallObject(pycallback, args); // dumps core! Py_XDECREF(args); Py_XDECREF(result); } } The call to PyEval_CallObject() dumps core. I know that the argument is being constructed correctly, since I can print it with PyString_AsString(PyObject_Repr(args)). I know that the callback is set correctly, since I can examine it in the same way. I can even call the callback function successfully (but not usefully) if I call it from set_callback(). It just doesn't work when I call it from within a GtkCanvasItem signal callback! Is there something special that I have to do to when calling Python from C within a C gtk signal callback? I can call the same Python function successfully, with the same C++ code, as long as I don't call it from within the signal handler. Any advice would be much appreciated. -- Steve -- /* EMail: [EMAIL PROTECTED] -- Phone: (301) 975-5423 -- -- WWW: http://math.nist.gov/~SLanger/ Fax: (301) 990-4127 -- -- Mail: NIST; 100 Bureau Drive -- Stop 8910; Gaithersburg, MD 20899-8910 */ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ 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] canvas item callbacks
Hmmm, I've run across this also. It turned out that I needed to create a shared library. If the original file is foo.c, compile it to foo.o then create a shared object called foo.so with ld -shared foo.o -o foo.so. Then it won't mind the undefined symbol (which gets loaded at run time) Mathew I have a feeling that I'm still doing something wrong, because calling the macros from pygtk.h was harder than it ought to be. I'm including pygtk.h like this: #define NO_IMPORT_PYGTK #include pygtk.h #undef NO_IMPORT_PYGTK That works as long as I don't use any macros. If I call PyGtk_BlockThreads, then python complains that _PyGtk_API is undefined and won't load my module's .so file. So I declared my own copy of _PyGtk_API, which feels like the wrong thing to do, but seems to work. Then I initialize it by duplicating the init_pygtk macro. (The reason that I can't just call init_pygtk directly is that it won't compile with g++. g++ says that the line _PyGtk_API = PyCObject_AsVoidPtr(cobject); requires an explicit cast.) Thanks again. -- Steve -- /* EMail: [EMAIL PROTECTED] -- Phone: (301) 975-5423 -- -- WWW: http://math.nist.gov/~SLanger/ Fax: (301) 990-4127 -- -- Mail: NIST; 100 Bureau Drive -- Stop 8910; Gaithersburg, MD 20899-8910 */ ___ 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] Name of the font I use
I don't think so. The gdk structure GdkFont does not save the font name. All you can really do is find out the height and width of a string with your font. Mathew Is there a way to find out the name of the font I use (e.g. Nimbus Sans I)? I tried to call font_id but to no avail (and I am not even sure that tha would have been the right call). TIA, J.B. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Duplicating testgtk.c
Hi- I'm trying to duplicate some code from testgtk.c in the gtk distribution. But, I cannot duplicate the line style = gtk_style_new (); In fact, I only see a few ways get ahold of a style. It would be nice if this function was wrapped. Am I missing something? Mathew ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/