External methods aren't the best solution I know.
It wasn't obvious to me how to call python scripts at
this point. For that matter if this is a good point to
do this kind of thing. Or how to hook the startup
event with a product.

Added these lines to the bottom of initialize(app) in
application.py



    # Ensure that a startup folder exists
    if not hasattr(app, 'startup'):
        from OFS import Folder
        Folder.manage_addFolder(app, id='startup',
title='Startup')
        get_transaction().note('Added startup folder')
        get_transaction().commit()

    # Call any external methods found in the startup
folder
    # Only call external methods
    startup = getattr(app, 'startup')
    for obj in startup.objectIds():
        obj=getattr(startup, obj)
        if hasattr(obj,'__call__') and
obj.__class__.__name__=='ExternalMethod':
            obj(app)
           

=====
Darrell Gallion




__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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

Reply via email to