Re: [Gtk-osx-users] Debugging PyGTK bundles.
- From: John Ralls <jralls ceridwen us>
- To: GTK+-2 OSX Users <gtk-osx-users lists sourceforge net>
- Subject: Re: [Gtk-osx-users] Debugging PyGTK bundles.
- Date: Thu, 19 May 2011 07:48:52 -0700
On May 19, 2011, at 4:37 AM, Dwayne Bailey wrote:
>
> Hi,
>
> Good news. My app mostly launches on 10.6 and 10.5. On my machine 10.6
> machine it runs quite well. But the bundle on a 10.5 machine and on
> someone else's 10.6 machine starts but then repeatably gives me the
> spinning pizza after a few actions.
>
> I get no tracebacks related to the hang so I was wondering how people on
> this list try to debug their bundled PyGTK apps. I've used -v when
> launching which helped me trace some issues. I haven't tried to use pdb.
>
> How do you do it? Help much appreciated.
You didn't say which Gramps launcher you used. The latest version passes control to a short python preamble that sets things up then passses control to Gramps by importing gramps.py on the last line. Instead of using $PYTHONPATH it sets up sys.path in the preamble. (The motivation was to get better control of language settings.) It did take a couple of tries to notice that I needed to set $PYTHONHOME to force it to use the python libraries in the bundle. I think that that wasn't so much of a problem before because the Apple-provided python libraries worked well enough, but with 2.7 in the bundle they don't. The need for lib/python2.7/config/ and include/python2.7 is a new requirement for 2.7 (2.6 and before didn't require it). It's in the Gramps bundle file but I haven't yet copied it to the examples in ige-mac-bundler.
What do you mean that your "python still has references to ~/gtk/inst"? Do you see rpaths with otool -L?
As for debugging, try http://docs.python.org/library/pdb.html. I haven't experimented with it much, but at first glance it looks like adding "-m pdb" in the exec line of the launcher script is the easiest.
Regards,
John Ralls
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]