I am no Zope monitor expert, but maybe you will find my newbie point
of view helpful. Here is my understanding of the magic of this very
helpful tool:

- Zope.app() gives you a *copy* of the *real* application object.
- app._p_jar.sync() reloads your copy with the real (losing your changes)
- get_transaction().commit() writes your copy to the real (applying your

    So what you want to do here is the latter. I tried the following and
it seems to work:

        python monitor_client.py localhost 8099
        Enter Password:
        warning: unhandled connect event
        Python 1.5.2 (#0, Apr  3 2000, 14:46:48)  [GCC 2.95.2 20000313 (Debian 
        Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
        Welcome to <secure_monitor_channel connected at 85a80f8>
        >>> import Zope, OFS
        >>> app=Zope.app()
        >>> newMethod = OFS.DTMLMethod.DTMLMethod('', __name__='theZopeMonitorIsCool')
        >>> app._setObject('theZopeMonitorIsCool', newMethod)
        >>> get_transaction().commit()
        >>> app._p_jar.close()

Hope this helps...


Yves-Eric Martin
Digital Garage Inc.

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to