[Cheetahtemplate-discuss] Problem with import from custom directory (was Re: Problem with import in
Brought to you by:
rtyler,
tavis_rudd
From: Webb S. <web...@gm...> - 2007-09-14 04:50:20
|
I don't think the problem is with mod_python. My question is now: How do I gracefully update sys.path to include a directory not in the standard python path? I want to import a module to use some constants in place holders. EG: #sys.path.append(/foo) #import bar ## in /foo <h1>the magic number is $foo.baz + 1 </h1> However, this doesn't work, throwing an error that bar is not found. I am resigned to compiling my cheetah templates and then editing the *.py files, but this seems bad. Thanks! W |