You may need to set the PYTHONHOME environment variable to Zope/lib/python, but make sure to also add an entry in PYTHONPATH to the "normal" Python library directory. ----- Original Message ----- From: "Jeff Kowalczyk" <jtk@yahoo.com> Newsgroups: gmane.comp.web.zope.general To: <zope@zope.org> Sent: Wednesday, July 31, 2002 11:34 AM Subject: [Zope] configuring Pythonwin for "import Zope"
- cd to your Zope's lib/python directory - invoke python (the version that you compiled Zope with) - at the interactive prompt type "import Zope"
This has been such a useful tip. I've spent the better part of two days poking around in python console learning a lot more about python and Zope's objects than I did trying to make products with edit-refresh-traceback cycles. The mistakes I was making with with import and from import jump out at you right away. Great stuff.
I would like to step it up to use Pythonwin for more experimentation, The browsing and code-complete features should make it a lot of fun. I've got Pythonwin 147 installed into my zope's python (used the registry editor to make a python2.1 entry mimicing that of python2.2, so the installer finds it). If you set the Pythonwin to startup in that dir, you can't load the IDE.
I added the path c:\progra~1\zope\lib\python to the Python Path, but I can't "import Zope". I can browse those classes in the Python Path, but they interactive prompt doesn't see the \lib\python heirarchy, unless there's some special syntax to refer to it that I haven't seen yet.
PythonWin's PythonPath setting C:\PROGRA~1\Zope\bin\Lib;C:\PROGRA~1\Zope\bin\DLLs; C:\PROGRA~1\Zope\lib\python
import Zope Traceback (most recent call last): File "<interactive input>", line 1, in ? ImportError: No module named Zope
Any ideas?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )