To find the absolute path to the package itself I use: import os, pkg_resources os.path.abspath(pkg_resources.resource_filename(__name__, ""))
For the URL path you could look at cherrypy.request.base and turbogears.url() Cheers CM On 2 Jun 2007, at 06:42, SamDonaldson wrote: > I'm trying to understand how turbogears is structured and how I could > get the full package path etc so that I don't have to hardcode this > stuff in. I'd like to make this OS independent. Also, stuff like > full path to my top level package directory, web server root etc.. > Where and what are the calls to get this info. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

