[BioPython] easy integration in Zope

Danny Navarro d.navarro@bmb.sdu.dk
04 Apr 2002 19:04:47 +0200


Hi all,

I was playing with the integration of biopython modules in Zope and I
found that it is very easy:

1. Write the scripts you want to put in form of "def" in a file ending
in ".py".

2. Copy this file to the "Extend" directory in the Zope top-level
directory (if you don't have it create it).

3. Add an external method from Zope Management Interface.

4. Type the file previously created as the module (type it without .py)

5. Type the function you want to use.

Call the function putting the URL of the external method followed by the
arguments:  $URL?arg=manolo

The function can be called in other normal Zope python script which can
have access to the Zope API. This I haven't tried yet but it should
work.

This approach has several disadvantages:

I didn't take care about security issues.
You can't access to the Zope API, and the biopython modules in the same
script. You have to wrap the biopython scripts.
The external script can't be managed through the Zope interface, you
have to go to the filesystem.

Developing a Zclass considering these issues it might be the solution
but for me this is enough.

With bioperl it should be the same but you have to have installed the
Zope-perl stuff.

I hope this information may have some utility.

Danny