Thursday, February 16, 2006

Turbogears

I finally got turbogears installed last night: http://turbogears.adnanwasim.com. The server is running SuSE 10.0 with Apache 2.x and mod_python.


There were two problems I ran into which weren't included in the tutorial I was reading here.


The first was the addition of:

os.environ['PYTHON_EGG_CACHE'] = '/path/to/.python-eggs/'

to the application start script. Since I had not had this specified the framework kept trying to write to "/root/.python-eggs", and obviously it didn't have permissions to write to this directory.


The second problem was my mistake. In the .htaccess file we need to put the following lines:


SetHandler mod_python
PythonHandler mpcp
PythonDebug On
PythonOption cherrysetup Project_Start_Script_Name::mp_setup



I had put in the full name of the script which was gs_start.py in place of Project_Start_Script_Name, which was giving the cryptic error "could not import py". To solve this, simply put gs_start::mp_setup without the .py.

Mozilla and hypocrisy

Right, but what about the experiences that Mozilla chooses to default for users like switching to  Yahoo and making that the default upon ...