Re: [Zope] sessions in the presence of conflicts

2005-12-14 Thread Dennis Allison
Hi Davids. Thanks for your note. I remember your post. No, I have not used HappySession although we looked at it when we started. When we started development, sessions had just become part of the standard release Zope and we decided that in the long run we'd be better off using the release

Re: [Zope] Unauthorized exception when trying to access a list item

2005-12-14 Thread Cameron Beattie
Cameron Beattie wrote: I am trying to access a value in a list. The script getDIDS_list is passed a list called listoflists: list = listoflists ret = [] tup = (0,1,2) factortup = (1,2) factor = 2 for i in range(len(list)): # 1 == 1 if i in tup: if i in factortup: x = list[i] * fac

Re: [Zope] Trapping zope exceptions in python script

2005-12-14 Thread Andreas Jung
--On 14. Dezember 2005 16:20:57 -0500 Jonathan <[EMAIL PROTECTED]> wrote: Thanks to everyone for the feedback... the bottom line seems to be that you can NOT trap zope exceptions in a python script... which seems a bit odd. Nothing is odd. I just told you to avoid *bare* try..excepts..as Ti

Re: [Zope] Unauthorized exception when trying to access a list item

2005-12-14 Thread David H
Cameron Beattie wrote: I am trying to access a value in a list. The script getDIDS_list is passed a list called listoflists: list = listoflists ret = [] tup = (0,1,2) factortup = (1,2) factor = 2 for i in range(len(list)): # 1 == 1 if i in tup: if i in factortup: x = list[i] * facto

[Zope] Unauthorized exception when trying to access a list item

2005-12-14 Thread Cameron Beattie
I am trying to access a value in a list. The script getDIDS_list is passed a list called listoflists: list = listoflists ret = [] tup = (0,1,2) factortup = (1,2) factor = 2 for i in range(len(list)): # 1 == 1 if i in tup: if i in factortup: x = list[i] * factor etc The code is a bit

Re: [Zope] sessions in the presence of conflicts

2005-12-14 Thread David H
Dennis Allison wrote: Zope 2.8.4, ZODB 3.4.2 I am still trying to resolve a "session variables in the presence of conflicts" problem. The observed symptom is that suddenly either some session variables disappear or all session variables disappear. In both cases, Zope has raised a KeyError exc

Re: [Zope] Programmatically flushing entries from RAM cache?

2005-12-14 Thread Paul Winkler
On Thu, Dec 15, 2005 at 11:45:51AM +0900, John Barham wrote: > Is it possible to flush a path w/ a specific argument from a RAM cache > from a Python script? I'm not sure what the "specific argument" refers to, but in general, sure. Just do this: ob = context.restrictedTraverse(some_path)

[Zope] Programmatically flushing entries from RAM cache?

2005-12-14 Thread John Barham
Is it possible to flush a path w/ a specific argument from a RAM cache from a Python script? Here's my situation: I have a script FolderExists() that takes a single "path" argument and, after running an SQL query, returns True or False if the folder path exists or not in the database. Since the

Re: [Zope] Trapping zope exceptions in python script

2005-12-14 Thread J Cameron Cooper
Jonathan wrote: Thanks to everyone for the feedback... the bottom line seems to be that you can NOT trap zope exceptions in a python script... which seems a bit odd. Of course you can. You just are restricted from importing certain things, which happens to include this class of exception. Pro

Re: [Zope] Trapping zope exceptions in python script

2005-12-14 Thread Tino Wildenhain
Am Mittwoch, den 14.12.2005, 16:20 -0500 schrieb Jonathan: > Thanks to everyone for the feedback... the bottom line seems to be that you > can NOT trap zope exceptions in a python script... which seems a bit odd. > No, you can. But you should know what you do and reraise critical (e.g. Conflict

Re: [Zope] Trapping zope exceptions in python script

2005-12-14 Thread Jonathan
Thanks to everyone for the feedback... the bottom line seems to be that you can NOT trap zope exceptions in a python script... which seems a bit odd. Jonathan - Original Message - From: "Andreas Jung" <[EMAIL PROTECTED]> To: "Nikko Wolf" <[EMAIL PROTECTED]>; Sent: Wednesday, Decemb

[Zope] sessions in the presence of conflicts

2005-12-14 Thread Dennis Allison
Zope 2.8.4, ZODB 3.4.2 I am still trying to resolve a "session variables in the presence of conflicts" problem. The observed symptom is that suddenly either some session variables disappear or all session variables disappear. In both cases, Zope has raised a KeyError exception for the a particu

[Zope] zope-2.9 r40780 make install doesn't finish, files missing from bin

2005-12-14 Thread Jeff Kowalczyk
I'm having some trouble with the 'make install' stage of Zope-2.9 svn. Using python-2.4.2 on Gentoo linux. Zope-2.9.0b1 installed fine, but I needed the fix for get_transaction() ASAP. URL: svn://svn.zope.org/repos/main/Zope/branches/2.9 Revision: 40780 # ./configure --prefix=/usr/li

Re: [Zope] Trapping zope exceptions in python script

2005-12-14 Thread Andreas Jung
--On 14. Dezember 2005 12:54:56 -0700 Nikko Wolf <[EMAIL PROTECTED]> wrote: So you could try this instead: for item in itemList: try: context.afolder.manage_delObjects([item]) except: continue Wa... DON'T DO THAT. You should *never* use bare try..ex

Re: [Zope] Trapping zope exceptions in python script

2005-12-14 Thread Nikko Wolf
Jonathan wrote: I am trying to catch a 'BadRequest' exception in the following python script excerpt: for item in itemList: try: context.afolder.manage_delObjects([item]) except BadRequest: continue NameError: global name 'BadRequest' is not defined The following would norma

[Zope] Trapping zope exceptions in python script

2005-12-14 Thread Jonathan
I am trying to catch a 'BadRequest' exception in the following python script excerpt: for item in itemList: try: context.afolder.manage_delObjects([item]) except BadRequest: continue The rationale behind this is that itemList may contain entries that no longer exist in 'afolder'

Fwd: [Zope] zopectl or runzope just won't start zope

2005-12-14 Thread Qass
Thanks for your reply fm. The python version in my path is 2.3.5 and both python and zope were build from source. Zope is installed in /opt which is where the python 2.3.5 is too. I got rid of the zope instance I had running earlier and created a new instance in my home directory. Now when I ru

Re: [Zope] zopectl or runzope just won't start zope

2005-12-14 Thread Floyd May
First, I would recommend against changing anything in any file at this point except configuration files. Next, verify that the correct python version is being used.  It's easy to have two pythons side-by-side on the same linux system.  If you built Zope from source, you (probably) should build pyt

[Zope] zopectl or runzope just won't start zope

2005-12-14 Thread Qass
Hi: I'm new to zope and yesterday installed zope 2.8.4 on a linux system running python 2.3.5 Having followed installation instructions I got to the point of 'zopectl start' and got the following error message while trying both 'runzope' and 'zopectl'. I've tried installing different versions of

[Zope] Re: ZClass - object is broken

2005-12-14 Thread Josef Meile
Hi Jens, i have a little Problem with an old self-made ZClass-Product named "CMSFolder". Allready existing objects of CMSFolder are broken since the last restart of the instance. It is really strange because there is no broken-sign in /Control_Panel/Products. It is still possible to create new

[Zope] dynamic js lists

2005-12-14 Thread [EMAIL PROTECTED]
Hi all Following up on my other post and having a read on quirksmode (thanks Peter). I came up with the following which unsuprising doesnt want to work. Could anyone point out any blindingly obvious code errors? I think it could perhaps be something to do with the cells number, ie cell[0] etc. Th

Re: [Zope] Mailman & Zope

2005-12-14 Thread Chris Withers
This is either an Apache or a Mailman question, but it doesn't have much to do with Zope ;-) I suggest you ask on a more appropriate list... Chris John Poltorak wrote: How do I configure a Mailman list for a website which is Zope based? I guess some entries in Apaches configuration file nee

Re: [Zope] List within a list - how to use in a page template

2005-12-14 Thread David H
David H wrote: Paul Winkler wrote: On Wed, Dec 14, 2005 at 06:06:21PM +1300, Cameron Beattie wrote: I am trying to get my head around representing a list in a page template. Assume the following list: m