PSP problem showing images

Alfons Nonell-Canals alfons.nonell at
Tue Oct 27 10:43:11 CET 2009

I have experience working with Python an dnow I would like to use it for
web development. I worked with php from several years ago and I'm trying
to move to PSP. I have no problem runing some tests, implement an small
project with psp is pretty easy. But I have only one problem, me scrips
don't show any image.

I developed a script which generates some images (is a work about
Chemistry) and returns a page with some results and these images. When I
run the script from the web browser, "all" works fine: the images are
created, some other staff is calculated and the final page with the
results is fine except the images. It does not print the images! I chech
the paths and all is fine.

With it I thought tha maybe there is something wrong in the apache's
configuration. And I'm almost sure the problem is there because the
Handler used only manages .psp documents. I add some code to not apply
the Handler to .png but... help?

Do you have any idea/experience?

Below is the configuration of the host...

<VirtualHost *:80>
        ServerAdmin user at

        # Indexes + Directory Root.
        DirectoryIndex index.psp
        DocumentRoot /path/to/the/pages
        <Directory /path/to/the/pages >
            AddHandler mod_python .psp
            PythonHandler mod_python.psp
            PythonDebug On
            <FilesMatch  "\.(jpg|gif|png)$">
                Sethandler None

        # Logfiles
        ErrorLog  /var/log/apache2/
        CustomLog /var/log/apache2/ combined

Thanks in advance!


Alfons Nonell-Canals, PhD
Chemogenomics Lab
Research Group on Biomedical Informatics (GRIB) - IMIM/UPF
Barcelona Biomedical Research Park (PRBB)
C/ Doctor Aiguader, 88 - 08003 Barcelona 
alfons.nonell at -
Tel. +34933160528

More information about the Python-list mailing list