[Tutor] A few very basic questions
alan.gauld at btinternet.com
Sun May 24 23:21:43 CEST 2009
"M Tramp" <mysterytramp at yahoo.com> wrote
> I've started trying ot learn about Python because ... Gramps, a
> To run Gramps on a Mac, I need to get GTK up and running.
Have you checked fink? There's a MacOS Gimp toolkit package available.
(Well 3 actually, gtk, gtk-data and gtk-shlibs) I generally use fink
try apt-get because I know the fink stuff is tested against MacOS. And fink
packages are pre-built usually...
> (FYI, I have a Mac, running OS X 10.4.11. Xcode 2.5)
> 1) GTK has several dependencies, according to
> ... pkg-config; GNU make; JPEG, PNG and TIFF image libraries;
These should all be in place already
> FreeType; fontconfig; GNU libiconv library; GNU gettext; GLib; Pango;
Not so sure about these though.
> Each of these may have dependencies as well. Is there someplace to
> go to figure out the order they should be compiled?
apt-get should sort most of that out for you, it checks depemdencies and
dependencies on dependencies etc. And if they are apt-get packages
they should be either pre bu8ilt or apt-get should initiate the builds for
you (I think, its been a while since I used it!)
> 2) Once each library is compiled, what should I have and where
> should it be on my hard drive?
Using make (either directly or via apt-get) should sort that out.
> For example, when Python sees "import gtk" in which directory is
> it looking for GTK?
Thats a different question because you need pygtk too and Python
looks for the pygtk file which in turn looks for the real gtk library...
And that should be a standard place that make knows about.
> How will GTK and the other libraries appear on my hard disk?
> As Unix executables or as frameworks or as something else entirely?
In normal Unix it would be as libraries but under MacOS its
entirely possible they show up as a Framework...
> 3) I am likely to do my Python programming inside Eclipse using
> pydev, though I have Xcode.
In my experience Eclipse is a better option than XCode unless
you are doing Aqua GUI programming XCode is great for Objective C
but I never liked it for Python.
> The libraries will be in C, correct?
Yes, mostly, some of the pygtk stuff may be in python.
> Will I be able to use Xcode to compile GTK and the rest,
> and then access the libraries inside Eclipse?
You should be able to. You may have to set up some paths in Eclipe's
Author of the Learn to Program web site
More information about the Tutor