Re: [Pyobjc-dev] OK, I'm already stymied.
Brought to you by:
ronaldoussoren
From: Gary R. <gro...@tr...> - 2003-05-06 10:34:52
|
OK, Ronald and bbum, thanks for the quick responses. I was able to successfully import Foundation so I guess my installation is OK after all. But I suggest updating the Tutorial (Documentation/PyObjC/tutorial/tutorial.html) so that it urges the user to "import Foundation" rather than "import PyObjC" since the latter won't work. I lost over an hour to that, and I'm on a race here to see how much I can accomplish with PyObjC over the next few days -- that will determine whether we use it for the project where considering! But, your quick responses once I asked the question made a big difference. Thanks again. Onward and upward! --Gary -- [http://ThisURLEnablesEmailToGetThroughOverzealousSpamFilters.org] Gary Robinson CEO Transpose, LLC gro...@tr... 207-942-3463 http://www.transpose.com http://radio.weblogs.com/0101454 > From: Ronald Oussoren <ous...@ci...> > Date: Tue, 6 May 2003 06:48:26 +0200 > To: Gary Robinson <gro...@tr...> > Cc: <pyo...@li...> > Subject: Re: [Pyobjc-dev] OK, I'm already stymied. > > > On Tuesday, May 6, 2003, at 05:05 Europe/Amsterdam, Gary Robinson wrote: > >> In the PyObjC tutorial, it says: >> >>> 1. Create a work directory src. Check which Python you have installed >>> PyObjC >>> for, by running python and checking that import PyObjC works. If it >>> does not >>> work it could be that you have installed PyObjC for /usr/local/python >>> but >>> Apple's /usr/bin/python comes first in your $PATH. Make sure you use >>> the right >>> python whereever it says python in this tutorial. >> >> I have run the PyObjC 0.9 installer. >> >> I have both 2.3 and Apple's 2.2 installed. >> >> Whether I am running python 2.2 or 2.3, the statement >> >> import PyObjC >> >> fails with >> >> ImportError: No module named PyObjC > > > That's right, PyObjC is only the name of the project not of packages we > install :-). I'd start by browsing some of the example code (for > example our tuturial). Use 'import Foundation' to access the Foundation > classes (and functions/constants in that framework). > > BTW. The installer only installs our packages for Apple's Python 2.2. > To use PyObjC with Python 2.3b1 you have to install using the > PackageManager (or just from source, the usual 'sudo python setup.py > install' will do). > > Ronald > |