I'm making a mod_python/PSP page. That page lives in two places, a dev spot and a live spot. It includes a custom module that is also either dev or live. I want the dev version to include the dev module & the live version to include the live module.
in PHP, I check to see what $_SERVER['PHP_SELF'] is to determine which file to include. Is there a way to do that in mod_python?
if it matters, I want to do something like:
Code:
import sys,string
if string.find($_SERVER['PHP_SELF'],"dev") >= 0: # obviously, that doesn't work
sys.path.append("/dev/module/path")
else:
sys.path.append("/live/module/path")
import module
... but am open to suggestions.