[Zope3-Users] Using zope.component outside Zope 3-how to bootstrap the registries

2007-02-16 Thread Andreas Jung

I am trying to use zope.component (Zope3 3.0) within a Python module
(not running the whole Zope 3 boilerplate). I want to register a utility.
What is the correct way to setup the registries (in particular the Utility
registry) in order to register utilities?

Andreas

pgpbf44gSXBxE.pgp
Description: PGP signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Using zope.component outside Zope 3-how to bootstrap the registries

2007-02-16 Thread Jeff Shell

On 2/16/07, Andreas Jung <[EMAIL PROTECTED]> wrote:

I am trying to use zope.component (Zope3 3.0) within a Python module
(not running the whole Zope 3 boilerplate). I want to register a utility.
What is the correct way to setup the registries (in particular the Utility
registry) in order to register utilities?


I don't think you need to set up the registries. There should be a
base Global Registry in place already.

Quite some time ago, I used zope.component, zope.interface, and a
couple of other core supporting packages (zope.exceptions,
zope.testing) in a command line tool. I didn't need to do any
bootstrapping. I was able to use `zope.component.provideUtility`
immediately.

I used packages extracted manually from Zope 3.1. I'm not sure what
`zope.component (Zope3 3.0)` is like. If it's from Zope3 3.0.0, it may
be radically different than what I used. I believe Zope 3.1
implemented the "Simplify Component Architecture" proposal which got
rid of extraneous bits like Services, and as such may be a bit easier
to work with.

--
Jeff Shell
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Using zope.component outside Zope 3-how to bootstrap the registries

2007-03-08 Thread Stephan Richter
On Friday 16 February 2007 08:15, Andreas Jung wrote:
>   I am trying to use zope.component (Zope3 3.0) within a Python module
> (not running the whole Zope 3 boilerplate). I want to register a utility.
> What is the correct way to setup the registries (in particular the Utility
> registry) in order to register utilities?

No need to setup any registries. Just use the zope.component API, for example:

provideUtility()
provideAdapter()

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users