Hello Florian,
There is a full-blow method for that in
src\zope\configuration\config.py in the class ConfigurationContext
called resolve.
Tuesday, January 17, 2006, 11:10:12 PM, you wrote:
Hello,
I've a string like zope.app.folder.Folder and I want to get the class
zope.app.folder.Folder
Florian Lindner wrote:
Hello,
I've a string like zope.app.folder.Folder and I want to get the class
zope.app.folder.Folder from this string. How can I do that?
It's probably more a python problem that Zope... but I hope you excuse.
another implementation ;)
zope.dottedname.resolve.resolve
Hello,
I've a string like zope.app.folder.Folder and I want to get the class
zope.app.folder.Folder from this string. How can I do that?
It's probably more a python problem that Zope... but I hope you excuse.
Thanks,
Florian
___
Zope3-users mailing
Hi Florian,
This function will do the job:
def translateDottedName(i):
names = i.split('.')
module = __import__('.'.join(names[:-1]), {}, {}, ['*'])
return getattr(module, names[-1])
Marc
Florian Lindner wrote:
Hello,
I've a string like zope.app.folder.Folder and I want to get
On Jan 17, 2006, at 5:10 PM, Florian Lindner wrote:
Hello,
I've a string like zope.app.folder.Folder and I want to get the
class
zope.app.folder.Folder from this string. How can I do that?
It's probably more a python problem that Zope... but I hope you
excuse.
Was just rewriting this
Hello,
what about:
http://www.talkaboutprogramming.com/group/comp.lang.python/messages/318370.html
Markus
17.01.2006 23:10, Florian Lindner:
Hello,
I've a string like zope.app.folder.Folder and I want to get the class
zope.app.folder.Folder from this string. How can I do that?
It's probably