On 1/19/06, Mike Sarahan <[EMAIL PROTECTED]> wrote:
> I'm working on making my project more portable, and I've got a couple
> of scripts that do the mundane tasks of resizing images and generating
> random lists to save time when a user asks for one.
>
> Is there an easy way to ask turbogears or cherrypy what is the root
> folder of a project?

In addition to what Elvelind said, it's worth pointing out the
pkg_resources functions for getting at a specific file:

pkg_resources.resource_filename(<package name or distribution name>,
"path/from/there")

or use resource_string to retrieve the file data directly

The advantage to using these is that they'll unzip your egg if needed
(if your egg is zipped).

Kevin

Reply via email to