Hi,

On 8/13/06, Matthew Burgess <[EMAIL PROTECTED]> wrote:
>
> It's late so I'm probably doing something really daft.  In
> config/environment.py line I've now got:
>
> root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
> sys.path.insert(1, "/home/matthew/python/lib/python2.4")
>
>
> But still dispatch.fcgi can't find the paste.deploy module :-(  I don't
> have to add sys.path to the 'paths' dict, do I?
>

It won't work because paste.deploy is imported before
config/environment.py is imported. If you want dispatch.fcgi to be
able to find paste.deploy, you need to modify the path before you
import modules.

This is can be done with the following code :

import os, sys
paths = ["/home/login/lib/python2.4/site-packages/"]
os.environ["PYTHONPATH"] = os.pathsep.join(paths)
sys.path[0:0] = paths
import site

After that, you'll be able to import modules that are in
/home/login/lib/python2.4/site-packages/.

Mathias

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to