[Zope] converting Python ap to Zope

Thomas B. Passin tpassin@mitretek.org
Mon, 3 Dec 2001 11:50:55 -0500


[Jerry McRae]

>
> I am attempting to convert a Python application into Zope.  I am having
> much trouble creating a Product from this application because of some of
> its dependances.  The user interface is completely separate, so that is
> not an issue.
>
> I have tried loading the whole app as an external method, which didn't
> work, but I learned to make a copy of ALL modules and place them in a
> Zope sub-folder.  The python path from my stand-alone python 2.1 didn't
> get searched.
>

You can handle this by creating a .pth file and putting it in the top-level
directory of Zope's python installation.  Look for a post by me on this
subject about a week ago, or just read the Python docs to find out about
.pth files.  That will take care of this part of your problems.

Given the ideosycratic nature of your code, I'd seriously consider running
it as a set of External Methods.  That way you only have to write the
interface, not rewrite the classes and tables.  Make sure to keep the code
out of the Extensions folder - that folder should only contain little
methods that dispatch to the actual code.

Cheers,

Tom P