I really think the only way to make this work is to design the products
with this in mind. Perhaps by developing a defacto standard for doing
monkey patches nicely.
I am going to experiment with ExternalEditor to see if I can dynamically
patch manage_main reliably rather than replacing it outright. If I work
out a reliable scheme, I'll write a how-to on it. Then maybe other
products can then use the same technique.
The problem is somewhat easier to solve for methods since you can detect
whether they have already been replaced (with func_globals) and you can
do the old "run my code and call the old one" trick.
On Wed, 2002-06-05 at 18:37, Jim Penny wrote:
> On Wed, Jun 05, 2002 at 10:51:45PM +0100, Adrian Hungate wrote:
> > PatchKit handles this for you (If you ask it to).
> > :)
> > Adrian...
> I am not sure that I understand. I need to be able to do a
> "cumulative monkey patch". Suppose that there were two independent
> products which both modified manage_main (without loss of generality,
> say ExternalEditor and ZShell). Most people use neither, some people
> use one, some use the other, and some use both.
> It is the case of people using both that I am interested in. To do
> this appears to me to require that I have access to the DTML form of
> any previous monkey patches to manage_main so that I can decide
> if I can safely patch the running version to meet the needs of both
> Is this possible?
> If both products were using PatchKit would it be possible? How about
> if only one used PatchKit?
> > --
> Zope-Dev maillist - [EMAIL PROTECTED]
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope )
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -