Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/p/r/Products.AttachmentField-1.4.5/Products/AttachmentField/Extensions/Install.py   Products.AttachmentField(Download)
 
# Products imports
from Products.AttachmentField import LOG, PROJECTNAME, product_globals
from Products.AttachmentField.global_symbols import *
from Products.AttachmentField import AttachmentFieldTool
    tool = getattr(self, AttachmentFieldTool.AttachmentFieldTool.id, None)
    print >> out, tool.migrate()
    print >> out, "Successfully installed %s." % PROJECTNAME
 
    return out.getvalue()
    try:
        cptool = getToolByName(self, 'portal_controlpanel')
        cptool.unregisterApplication(PROJECTNAME)
    except:
        LOG.info("Error at uninstall", exc_info=True)
 
    print >> out, "Successfully uninstalled %s." % PROJECTNAME