Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/c/o/collective.anotherdynamicgroupsplugin-0.3/collective/anotherdynamicgroupsplugin/setuphandlers.py   collective.anotherdynamicgroupsplugin(Download)
# coding=utf8
from .config import PACKAGE_NAME, PLUGIN_ID
from .plugin import AnotherDynamicGroupsPlugin
from Products.CMFCore.utils import getToolByName
from Products.PlonePAS.Extensions.Install import activatePluginInterfaces    
    acl_users = getToolByName(portal, 'acl_users')
 
    if PLUGIN_ID not in acl_users.objectIds():        
        plugin = AnotherDynamicGroupsPlugin(
            id=PLUGIN_ID, 
            title=PLUGIN_ID.replace('-', ' ').title()
        )
        acl_users._setObject(PLUGIN_ID, plugin)
        activatePluginInterfaces(portal, PLUGIN_ID, StringIO())

src/c/o/collective.anotherdynamicgroupsplugin-0.3/collective/anotherdynamicgroupsplugin/util.py   collective.anotherdynamicgroupsplugin(Download)
from zope.app.component.hooks import getSite
from .config import PLUGIN_ID
from Products.CMFCore.utils import getToolByName
 
def get_plugin():
    portal = getSite()
    pas = getToolByName(portal, 'acl_users')
    return pas[PLUGIN_ID]