[TransWarp] a peak.naming question

Phillip J. Eby pje at telecommunity.com
Thu Jul 3 18:18:12 EDT 2003


At 04:48 PM 7/3/03 -0500, darryl wrote:

>now if i follow those steps i get:
>
>
> >>> from peak.api import *
> >>> PEAK_CONFIG='sampleApp.ini'
> >>> naming.lookup('config:MyDb.Database/')
>Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>TypeError: lookup() takes exactly 2 arguments (1 given)
> >>>

Since 0.5 alpha 1, the last line should become these 2:

root = config.makeRoot()
root.lookupComponent('config:MyDB.Database/')

Note that you can also explicitly specify ini files as an argument to 
'makeRoot()'; see its docs for details.




More information about the PEAK mailing list