HI All,

How can i create a file in ZMI using python script (It is working fine with python external method). Here I want to write the output of a query to a file in ZMI.


from Products.PythonScripts.standard import html_quote, structured_text
from Products.CMFCore.utils import getToolByName
portal_catalog = getToolByName(context, 'portal_catalog')

request = container.REQUEST
RESPONSE =  request.RESPONSE
site_title = context.portal_url.getPortalObject().Title()
site_desc = context.portal_url.getPortalObject().Description()
site_url = context.portal_url.getPortalObject().absolute_url()

query = {}
query["portal_type"]='Article'
query["sort_on"]='Date'
query["sort_order"]='reverse'
query["review_state"]='published'
query['getMycategory']=my_id #our search category

brains = portal_catalog.searchResults(**query)

I want to write the output to file and access in ZMI.

Thanks and regards,

Kedar
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to