On Jan 8, 2007, at 1:50 PM, [EMAIL PROTECTED] wrote:
Hi guys!
I'm working on a plugin to cheetah template that let me use template
inheritance a easier way. I want to know how can I refer to the
application root directory (where my application resides). Suppose I
start the wiki20 application, how can I refer to the
/home/michel/Projects/wiki20/wiki20 path?
I need to have access to this path from my plugin because I don't
working with python path to know where templates can be found, I'm
working with filenames even when using inheritance.
TG uses pkg_resources.resource_filename for those kind of things.
For example, You can get the full path to the "templates" dir inside
the "wiki20" package by:
resource_filename("wiki20", "templates")
HTH,
Alberto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---