Class context execution problems

Marcelo de Moraes Serpa celoserpa at gmail.com
Thu Mar 6 08:04:26 EST 2008


I'm using a class in a conext other than the subpackage in which it is
located and I'm getting template lookup errors.

This class expects to find a .pt file in a directory relative to its
package. However, this class is normally used by other classes in the same
namespace.

class ObjectWidget:
     template = "templates/objectwidget.pt"

However, I needed to import this class (ObjectWidget) from a class outside
its namespace(package). Now, I think the class is running in the context of
the file that is using it and so, the
the class not finding the .pt file (I think becouse the class file is being
contextualized to the currently running one which is outside the browser
subpackage)

how could I solve it?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080306/29e725fa/attachment.html>


More information about the Python-list mailing list