[mod_python] Problem with PythonImport

Rafal Zawadzki bluszcz at jabberpl.org
Mon Dec 26 12:44:48 EST 2005

Hi. At the beginning I have to say that I read:

* thread called "PythonImport: Can someone please draw a diagram for this 
idiot?" and others similar ;>
* documentation about PythonImport

I am writing web application using modpython 3.1 + psp. I am using apache2, my 
apache2.conf contains:

PythonImport Baza glam.idoru
PythonOptimize on

and file of my virtual host contains:

<Directory /home/bluszcz/www/glam.idoru>
DirectoryIndex index.psp index.html
AddHandler mod_python .psp
PythonHandler mod_python.psp
PythonDebug On
PythonPath "sys.path+['/home/bluszcz/www/glam.idoru']"
AllowOverride None

cat testimport.py

req.write("<br />")

links -dump http://glam.idoru/admin/testimport.psp

gives me:

['FileCache', 'HitsCache', 'PSP', 'PSPInterface', 'Session', '__builtins__', 
'__doc__', '__file__', '__mtime__', '__name__', '_apache', '_psp', 'anydbm', 
'apache', 'code2str', 'dbm_cache_get', 'dbm_cache_store', 'dbm_cache_type', 
'dbm_types', 'escape', 'form', 'handler', 'marshal', 'mem_fcache', 
'mem_scache', 'new', 'os', 'parse', 'parsestring', 'path_split', 'psp', 
'req', 'session', 'str2code', 'sys', 'tempdir', 'tempfile', 'util', 

My question is how can I get to my "Baza" module? I am trying to use it with 
persisten database connection (there is no enough docs about it!). Module 
Baza is has been loaded (i tried to put into this command creating dir, and 
it works).

Thanks and cheers, 

Rafał Zawadzki [jid/mail: bluszcz at jabberpl.org, skype: blvszcz]

More information about the Mod_python mailing list