[Zope] Using pydoc or epydoc on Zope products

Sean Gillies sgillies at frii.com
Thu Aug 7 15:30:36 EDT 2003


On Thursday, August 7, 2003, at 02:06  PM, Sean Gillies wrote:

> Greetings,
>
> I have a Zope product (http://zope.org/Members/sgillies/zmapserver)
> and am trying to put together documentation using pydoc or epydoc.
>
> Problem is that each of these croak when they inspect my packages
> which import:
>
> import Globals
> from Globals import Persistent
>
> pydoc reports
>
>   ImportError: cannot import name Persistent
>
> and epydoc reports similarly.  I am certain that I have PYTHONPATH
> set up correctly.  I've been using ZopeTestCase extensively in
> development, so I think I have a good handle on the environment
> needed to import Zope.
>
> Can pydoc/epydoc be used for my purposes only within the context of a
> live Zope?  Am I going to have to create a Zope instance as in a
> ZopeTestCase and then run pydoc/epydoc against the code in Products?
>
> I'd really like to hear of any kind of solution.
>
> thanks,
> Sean
>
Well, just answered my own question.  Funny how when you take
the time to really think it through enough to describe it to
others, the solution can come around.

I edited epydoc to add

   import Zope
   app = Zope.app()

at the beginning.

cheers,
Sean



--
Sean Gillies
sgillies at frii dot com
http://www.frii.com/~sgillies




More information about the Zope mailing list