I believe the PythonPath is only works for mod_python.
If you are using Spyce as a proxy you need to set the
SPYCE_PATH environment variable.
Something like this should work:
SetEnv SPYCE_PATH /your/path
You should be able to point the proxy to the
configuration file you want it to use using the --conf
command line option. I think the SPYCE_CONFIG is only
for mod_python as well.
spyceCmd.py -l -p 8000 --conf /path/to/spyce.conf
Hope that helps,
--- Lukas Linhart <almad@...> wrote:
> I'm trying to run Spyce as proxy server.
> I run spyce with command
> spyceCmd.py -l -p 8000 /var/www/webroot
> Then, in virtual host configuration I have:
> <VirtualHost 192.168.14.14>
> DocumentRoot /var/www/webroot/rpgplanet
> DirectoryIndex news.spy
> ServerName http://www.rpgplanet.cz
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteRule ^(.*\.spy)
> http://localhost:8000/rpgplanet$1 [p]
> PythonOption SPYCE_CONFIG
> PythonPath "sys.path+[r'/usr/share/spyce']"
> PythonDebug On
> PythonAutoReload On
> Well, everything works quite fine, but Spyce seems
> to ignore SPYCE_CONFIG
> file: there stands
> path: /var/www/webroot/pythontest/modules
> However, when trying to import from this directory,
> spyce give:
> Spyce exception
> File: /var/www/webroot/rpgplanet/news.spy
> ImportError: No module named kernel
> Stack: news.spy:5, in (main):
> import kernel
> Under mod_python, this file works quite fine. So,
> I'd like to ask two
> 1) Is Spyce using SPYCE_CONFIG directive / is spyce
> using this config file? Is
> it possible to use directives defined in spyce.conf
> only for virtual host for
> which SPYCE_CONFIG is defined?
> 2) Is there any other way I can add some directory
> to search when importing
> module? I wan't to add it "site-widely", that means
> that /var/www/webroot/rpgplanet/modules should be
> imported only by files
> under /var/www/webroot/rpgplanet/* can access these
> I'm doing this as Conan advice me: I wan't to have
> one one pool per
> server...or, I wan't to hold some data (i. e. id and
> nick of all users
> registered on my site) in memory (for performance
> purposes). However, when
> using mod_python, Spyce creates one pool per thread
> (or, when creating
> instance of my Kernel class, class atributes are
> also shared only between
> thread), which makes this impossible for me.
> Thanks for advices,
> Lukas "Almad" Linhart
> [:: http://www.Include.cz/ ::]
> [:: Including Your wishes ::]
> [:: PGP/GNUPg key:
> http://download.almad.net/pubkey.asc ::]
> ATTACHMENT part 2 application/pgp-signature
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.