[BioPython] Solved BioPython & Zope problem and a Bug?

Brad Chapman chapmanb at uga.edu
Tue May 4 12:55:38 EDT 2004


Hi Cristian;

> I could solve my problem with BioPython in Zope.

Thanks for your work on this. I suspect there are not many people
out there (myself included) working with Zope and Biopython, so I
appreciate your work treading into unknown territory.

> The main problem was
> Zope can't import some functions defined in some modules. These modules
> have other modules with relative imports and Zope can't import them. 

Okay, I guess the problem is that both Zope and Biopython are
probably playing around with import hooks. I don't know enough about
all of what Zope does to fix all of the problems, but I guess the
best way is trial and error.

> Bio.config.FormatRegistry.py have the following relative import:
> 
> import _support
> 
> I change it to:
> 
> from Bio.config import _support

Fixed.

> I do the same with FormatIO.py with ReseekFile import.

Where specifically are these problems and I can add the relevant
full import? Do all relative imports need to be removed?

> The second problem IS """Bio.MultiProc.copen""". I really don't know
> why, but Zope begin an infinity loop when I ask for the symbol table of
> the module. To solve these problem I commented the import on the
> Bio.config._support module.

Okay, I moved this import into the __call__ function where it is
used. Hopefully that'll fix the import loops.

Both of those changes are in CVS -- please let me know if that fixes
things or if other changes are needed.

Thanks again for the work!
Brad


More information about the BioPython mailing list