Note that there are some explanatory texts on larger screens.

plurals
  1. POImportError: No module named Foundation
    text
    copied!<p>Hey all, I'm pretty new to python, so bear with me.</p> <p>I want to write a simple script using some components of PyObjC. I'm running on Mac OS 10.5, so from what I've read, it's included.</p> <p>However, opening up a simple python prompt and typing <code>import Foundation</code> gives me the error <code>ImportError: No module named Foundation</code>.</p> <p>For reference, my sys.path is</p> <pre><code>['', '/var/hg/lib/python2.4/site-packages', '/Users/dmitri/lib/python', '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/PyObjC', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyObjC', '/Users/dmitri', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages'] </code></pre> <p><code>'/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/PyObjC',</code> and <code>'/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PyObjC',</code> got in there because I was fooling around, but they don't seem to help me. The 2.4 version seems to exists but there, seems to be no folder with the aforementioned path in the 2.5 version.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload