[Zope-dev] Beginner doubts

Andrew Bennetts andrew-zopedev at puzzling.org
Wed Sep 17 21:42:18 EDT 2003


On Wed, Sep 17, 2003 at 04:07:01PM -0300, Emiliano Marmonti wrote:
[...]
>   File "C:\Archivos de programa\Zope\lib\python\App\Product.py", line
> 44, in ?
>     from Factory import Factory
> ImportError: cannot import name Factory
> 
> ------ end of python --------
> 
> My problem is that if I could not use a Catalog, what will I use? I

Try doing:

    import OFS.Application
    OFS.Application.import_products()

(Or alternatively:
    import Zope
    Zope.startup()
 but this opens an actual ZODB storage, etc, which you don't necessarily
 want to do.)

Catalogs are in a Product, and to use Products you must first call the above
magic.  Obviously in a running Zope this has already been done for you :)

-Andrew.




More information about the Zope-Dev mailing list