[Zope] Timeout on server when python script is running
Hello everybody! I have a python script running from a plone site..it takes a lot of time (1 hour maybe more) but I need to run it just for data recovery if something goes wrong. after about 20 minutes a Timeout on server message pops up.. I tried and found where to change timeouts in zope.conf, but nothing changed. Wrong place? Please help, thanks! Stef ___ 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 )
[Zope] grufspaces, scripts and inherited permissions
Hello everybody, I created a group member and a group folder (using grufspaces), from where I run a python script. The result of this script is a n number of brain objects (indexed_file) indexed in portal_catalog. All object are correctly indexed, so I can search contents, but as a groupmember only. the question is: how can I modify (from the script) permissions of the brains objects in order to get them searchable from anybody? the main part of my script: for pub in context.query_05(idx_value=idx_value): object = '/query_06/' + pub.id + '/indexed_file' my_catalog.catalog_object(pub, object) thanks! Stefano ___ 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 )
Re: [Zope] python script, from string to dictionary.
On Thursday 07 February 2008 11:25:07 Chris Withers wrote: Bill Campbell wrote: On Thu, Feb 07, 2008, Stefano Guglia wrote: hello! I converted a dictionary in a string, and now I need to change back the same string as a dictionary in a zope python script. s = repr(d) newdict = eval(s) NO! Never ever ever eval strings. At some point you will end up eval'ing an user-supplied string and hey presto - instant massive security vulnerability. The original post is a bit crap, since no mention was made as to how the dict was turned into a string. As to what he wants to do with this and why he's doing it, that's likely the source of the real problem! cheers, Chris I 'serialized' mysql data in order to flat one-to-many related tables. the resulting dictionaries (one per record) are i.e. as: mydict [ brandcode ] = { 'itemcode': 'some value', 'itemsizeavail': [ ('XL',), ('XXL',), ('S',) ], 'keythree': '', 'keyfour': [ ], ... } now then I can index the whole content in order to get it searchable from the Plone quick search form. mydict [ ] records are then saved as strings in a DB table records. I need now to pass again from string to dict, to access key/values and print detailed reports. could you have much better ideas on how to, pls let us know. I handle python, zope etc. at a very basic level now, so surely I've missed some features I'm sorry if I wasn't clear, and thanks! Stefano. ___ 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 )
[Zope] brains and metal:fill-slot
hello everybody! I have a bunch of brains. Their URLs point at a *.cpt file I wanted to be displayed inside the 'main' plone slot, so the usual code: html metal:use-macro=here/main_template/macros/master body metal:fill-slot=main but it doesn't work. Error Type KeyError Error Value '@@plone' this is the cryptic (for me :-) message shown and no help from google..Any idea or link, please? bye! Stefano ___ 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 )
[Zope] plone site dreamweaver
Hello! I need to use dreamweaver to manage a plone site but I cannot find a detailed howto. Any help? thank you, stefano. ___ 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 )