[PEAK] Offering Named Services with configuration keys

Phillip J. Eby pje at telecommunity.com
Wed May 18 23:07:30 EDT 2005

At 12:54 AM 5/19/2005 +0000, Tiago Cogumbreiro wrote:
>As I said before, in my use case it depends on the ISQLConnection
>interface. I tried doing this but it failed:
>[Component Services]
>peak.api.storage.ISQLConnection = "myapp.db"
>But that besides not working felt like a hack...

The correct incantation would be:

     [Component Factories]
     peak.api.storage.ISQLConnection = lambda: config.lookup(targetObj, 

It's still a bit of a hack, but it should work.

More information about the PEAK mailing list