On Mon, 7 May 2007 at 09:16, Jim Steil wrote:
> How do others handle this type of situation?  Should I have the program
> stored outside of my TG hierarchy altogether?  Should I just hard-code
> the path to the images?  I'm looking for some direction here in the
> proper Pythonic way of doing this.  FWIW, the path to my TG app top
> level directory is different on my development and production machines.

One way to do this, assuming your TG ap is in your python path, would be
to import something from the tg ap, pick up module.__file__, and compute
the relative path to the static directory based on that.

There might be better ways, but that's what pooped into my head first :)

--David

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to