[Zope3-Users] Problem importing zope modules from
/usr/local/zope3Instance/lib/python/productname folder
Duncan McGreggor
duncan.mcgreggor at gmail.com
Fri Oct 7 14:40:55 EDT 2005
On Oct 7, 2005, at 12:43 PM, Christian Lueck wrote:
> Ronald L Chichester wrote:
>
>> In chapter 4 of Philipp's book, he runs the python interpreter from
>> the command line and imports several zope modules. I tried doing that
>> from /usr/local/zope3Instance/lib/python/productX but python said the
>> zope modules were unavailable. Is there some trick to this? Did I
>> miss a configuration?
>>
>> Note, the instance of Zope3 was/is running properly.
>
> You have to set the PYTHONPATH environment variable, see page 9 of
> Philipp's book.
>
> Kind regards,
> Christian
Note that you can enter debug mode from the python interpreter for your
zope instance. As mentioned above, you need to have your PYTHONPATH set
to include the path to your <zope 3 install>/lib/python dir. Then just
do this:
cd <zope instance>
python
> > > from zope.app.debug import Debugger
> > > debugger = Debugger('var/Data.fs', 'etc/site.zcml')"
> > > root = debugger.root()
and then you're off and running...
For more details, see http://svn.zope.org/Zope3/trunk/doc/DEBUG.txt
d
More information about the Zope3-users
mailing list