Getting Instance of calling class
Thomas Güttler
guettler at thomas-guettler.de
Tue Jun 17 03:17:53 EDT 2003
Hi!
I have a function called _() which prints
strings according to the language of the user.
I don't want to give this method the object which
holds the language information every time I call it.
How can I access the calling object?
Background: This is a python product for zope.
My main object holds the prefered language of each
user.
I found no way to get a reference to my main
object from _(). Global variables are no solution
since there could be several main objects and there
are multiple threads.
thomas
More information about the Python-list
mailing list