[Zope] How to store in a RAM cache a list of objects?
I'd like to RAM cache the result of a long-runing ZopeFind method, formatted to a plain list of objects. But the RAM cache doesn't store the list and hence every time the supossedly cached method is called, the ZopeFind process id triggered. Other data (like the lenght of the resulting list) is stored and retrieved with no problem, telling by the cache manager's stats tab. Is that normal behaviour of the RAM cache machinery? I'm using Zope 2.73 on a w2k box, and the objects are sort of instances of the ExtFile(ExtImage) product. (Although the same happens with plain DTML Documents that I created for test purposes.) In both cases I set the "threshold entries" to a number higher than the lenght of the list, and also did the same with the "cache-size" in zope.conf Thanks in advance, Ausum ___ 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] I still can't load Zope at start up on a Mac OS X Server
Hi, Garito wrote: Hi all Now I'm trying launchd method I have: lanunchd[309]: ZopeSistes: respawning too quickly! throtting or exits with exit code: 1 errors at system.log (it depends how I launch zope) Yep, your Zope is dying. Try just using runzope with debug-mode on in zope.conf and maybe it'll give you an idea of what's failing... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ 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] How to create an ansynchronous method
David Pratt wrote: really interesting.I think it would be a really good thing to see fire and forget with a process you create as a series of steps that can also be queued in one or more queues. Well, I think ZAsync would be great for building and managing the queues, with Stepper steps being used to process them... I also think there is some interesting possibility for something like a Zope instance Stepper where you could trigger a generic daemon to run a thread to process asynchronous tasks (steps) without a ZEO requirement. Huh? That made no sense. Spawning new ZServer threads is evil, I like the fact that Stepper keeps it simple and connects to a ZEO server. It means Stepper can be run from any normal Zope client build and doesn't need to do anything funky. The asynchronous jobs could be queued for long running tasks outside of zope or timed to inject the step requests into zope for the maintenance of a zope instance (in the same vein as ClockServer) but in a single product. I think a combination of Stepper and ZAsync could meet your needs, when you hit specific problems which you need help with, let me or Gary know :-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ 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] LAN access and session timeout?
Hi guys, I installed ZOPE on my PC with a WIN XP operating system. I connected this computer to another one with the same operating system. Everything works fine except the fact that after a certain time period, I am not able to have access to the ZOPE server through the connected (2nd) computer anymore. Do you know what the problem is? I already tried to change the .conf file of my instance by replacing the "timeout-minutes" option - but it did not work. sincerely, Benjamin _ Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179 ___ 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] Parse a XML file in Zope, zopeXMLmethods Product not working in Zope 2.8.1
Hello, I've a xml file on the file system (the source is on an other webserver and the download is scheduled). How ca I parse this file with a xslt in Zope. ZopeXMLmethods isn't working annymore in Zope 2.8.1. Does annyone knows a Product of method to parse xml in Zope without the zopeXMLmethods product ? Regards, Martin Koekenberg ___ 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: [***SPAM*** Score/Req: 04.00/04.00] Re: [Zope] I still can't load Zope at start up on a Mac OS X Server
Chris Withers escribió: Hi, Garito wrote: Hi all Now I'm trying launchd method I have: lanunchd[309]: ZopeSistes: respawning too quickly! throtting or exits with exit code: 1 errors at system.log (it depends how I launch zope) Yep, your Zope is dying. Try just using runzope with debug-mode on in zope.conf and maybe it'll give you an idea of what's failing... cheers, Chris Sorry but if I launch it manually (zopectl start) it works fine cheers! -- Mis Cosas http://blogs.sistes.net/Garito/ ___ 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] Parse a XML file in Zope, zopeXMLmethods Product not working in Zope 2.8.1
Martin Koekenberg escribió: Hello, I've a xml file on the file system (the source is on an other webserver and the download is scheduled). How ca I parse this file with a xslt in Zope. ZopeXMLmethods isn't working annymore in Zope 2.8.1. Does annyone knows a Product of method to parse xml in Zope without the zopeXMLmethods product ? Regards, Martin Koekenberg ___ 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 ) Hi! I use xml.dom.minidom Alternatives? Thanks! -- Mis Cosas http://blogs.sistes.net/Garito/ ___ 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] Parse a XML file in Zope, zopeXMLmethods Product not working in Zope 2.8.1
Am Montag, 26. September 2005 15:57 schrieb Martin Koekenberg: > Hello, > > I've a xml file on the file system (the source is on an other webserver and > the download is scheduled). How ca I parse this file with a xslt in Zope. > ZopeXMLmethods isn't working annymore in Zope 2.8.1. > > Does annyone knows a Product of method to parse xml in Zope without the > zopeXMLmethods product ? > > Regards, > > Martin Koekenberg I do it like this (ExternalMethod in this case): import libxml2 import libxslt stylestring = file("/path/to/style/file.xsl").read() def xslt(data): # note: if styledoc and style are defined outside the function, # zope dumps core :-( styledoc = libxml2.parseDoc(stylestring) style = libxslt.parseStylesheetDoc(styledoc) doc = libxml2.parseDoc(data) result = style.applyStylesheet(doc, None) html = style.saveResultToString(result) style.freeStylesheet() doc.freeDoc() result.freeDoc() return html may be not very smart, but it's working :-) Cheers, Sascha ___ 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] Using the set object within page templates
How can I use a set object within a page template? When I attempt to create a set (e.g. tal:define="myset python:set(some_list)"), zope complains that the name 'set' is not defined. Thanks! fm ___ 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] Using the set object within page templates
Python sets are not available from with ZPT since ZPT and PythonScripts run within a sandbox. Write an external method or move your code to trusted code (Zope product). -aj --On 26. September 2005 13:38:55 -0500 Floyd May <[EMAIL PROTECTED]> wrote: How can I use a set object within a page template? When I attempt to create a set (e.g. tal:define="myset python:set(some_list)"), zope complains that the name 'set' is not defined. Thanks! fm ___ 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 ) pgphoc0s3dS1Z.pgp Description: PGP signature ___ 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] Parse a XML file in Zope, zopeXMLmethods Product not working in Zope 2.8.1
Martin Koekenberg wrote at 2005-9-26 15:57 +0200: > ... >Does annyone knows a Product of method to parse xml in Zope without the >zopeXMLmethods product ? You can use any of the methods for XML parsing supported by Python, among others * MiniDOM * "[c]ElementTree" * SAX * "pyexpat" * "sgmlop" * "libxml2" Note that the listed options operate on different API levels (DOM, SAX, raw parsing events). -- Dieter ___ 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] LAN access and session timeout?
Benmania Guin wrote at 2005-9-26 15:34 +0200: > I installed ZOPE on my PC with a WIN XP operating system. I connected this > computer to another one with the same operating system. Everything works fine > except the fact that after a certain time period, I am not able to have > access to the ZOPE server through the connected (2nd) computer anymore. >Do you know what the problem is? No, but apparently, it has nothing to do with the session timeout. Do you say that you can connect Zope from the first but not any more from the second computer? That would be *very* strange as Zope does (by default) not destinquish requests according to their source (all requests look equal to Zope whether they come from your first or second computer). It would indicate more a problem with your environment than with Zope. -- Dieter ___ 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] How to store in a RAM cache a list of objects?
Ausum Studio wrote at 2005-9-26 03:19 -0500: >I'd like to RAM cache the result of a long-runing ZopeFind method, formatted >to a plain list of objects. But the RAM cache doesn't store the list and >hence every time the supossedly cached method is called, the ZopeFind >process id triggered. Other data (like the lenght of the resulting list) is >stored and retrieved with no problem, telling by the cache manager's stats >tab. > >Is that normal behaviour of the RAM cache machinery? It is very dangerous (and almost impossible) to cache persistent objects outside of their ZODB connection. The RAM Cache Manager knows about this danger and tries to make sure, it caches only simple objects (not sure that it catches persistent objects). For this reason, you cannot cache the full result of a "ZopeFind". However, you can cache the paths part of it. -- Dieter ___ 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] Using the set object within page templates
Is there no way to allow sets to be used within templates/scripts? fm >>> Andreas Jung <[EMAIL PROTECTED]> 9/26/2005 1:41:18 PM >>> Python sets are not available from with ZPT since ZPT and PythonScripts run within a sandbox. Write an external method or move your code to trusted code (Zope product). -aj --On 26. September 2005 13:38:55 -0500 Floyd May <[EMAIL PROTECTED]> wrote: > How can I use a set object within a page template? > > When I attempt to create a set (e.g. tal:define="myset > python:set(some_list)"), zope complains that the name 'set' is not > defined. > > Thanks! > > fm > ___ > 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 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] Using the set object within page templates
--On 26. September 2005 13:52:16 -0500 Floyd May <[EMAIL PROTECTED]> wrote: Is there no way to allow sets to be used within templates/scripts? As I said: No, by default. Look at lib/python/Products/PythonScripts/README.txt. -aj pgpj6IBRvuIhK.pgp Description: PGP signature ___ 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] Page Template security problem
I'm having a problem figuring out how to keep things secure while allowing a proxied script to call a page template correctly. /details/sendDetails Python script that is publicly available, receives an email address and sends that person thier details stored in the database. The script has proxy rights of "Administrator". /admin/person/emaildetails.htm Page template that is secured (admin folder is Administrator only for "view" and "access contents information"). The anonymous user is prompted for authentication. If I change emaildetails.htm to a simple "test" text file it works, the problem seems to lie when the template tries to access any script from the context. I tried to give those scripts proxy rights too but that had no effect. Am I going about this the wrong way, is there something I missed, or am I just going to have to revert to rewriting the whole details.htm as DTML? ___ 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] Page Template security problem
--On 27. September 2005 16:54:05 +1200 Chris Beaven <[EMAIL PROTECTED]> wrote: The anonymous user is prompted for authentication. Install VerboseSecurity and look at the output of VS. -aj pgpZnDneG6HFd.pgp Description: PGP signature ___ 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 )