[Zope-dev] Re: your mail

2001-04-09 Thread Federico Di Gregorio

Scavenging the mail folder uncovered Randall F. Kern's letter:

[snip]
> Concurrent updates are not supported in the serializable transaction
> mode; if one transaction tries to update (or delete) a row that has
> already been updated by a concurrent uncommitted transaction, the second
> transaction will fail with a "concurrent update" error.

mmm... are they supported in the read commited mode? if yes it will be
easy to add this mode as on option to psycopg cursors and use it in zope.
do you know how much faster would it be compared to the serialized mode?

> Given that the default transaction mode for these DAs is Serializable,
> and Zope has this nifty support for ConflictErrors and retrying
> transactions already, I propose Postgres DAs should convert the
> concurrent update serialization errors into ConflictErrors
> automatically.
> 
> I've been running this way for a few days, and everything seems great.
> Any reasons why this might be good/bad/ugly very welcome.  (Like: is it
> safe to throw a ConflictError at any random time during processing?
> >From a quick glance at ZODB it seems they are only thrown at commit time
> now)
> 
> Here is a small patch to ZPsyccopgDA 0.5.1 that implements this change:

thank you very much for the patch. i am waiting to know what others think
about it (i am not a ZODB expert) before we incorporate it.

ciao,
federico

-- 
Federico Di Gregorio
MIXAD LIVE Chief of Research & Technology  [EMAIL PROTECTED]
Debian GNU/Linux Developer & Italian Press Contact[EMAIL PROTECTED]
   Don't dream it. Be it. -- Dr. Frank'n'further

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] how can I stop zope through ftp?

2001-04-09 Thread robert at rocad

Hi there,
I am looking for a way to stop zope through FTP.

Why?
I would like to have a button on my (Windows) desktop I can push to restart
zope without leaving Zopes current setup.

thanks
Robert



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] how can I stop zope through ftp?

2001-04-09 Thread Phil Harris

My take is that you won't be able to restart Zope via FTP, but you can do it
with a normal URL link.

The URL would be http://yourmachine/Control_Panel/manage_restart to restart
it or http://yourmachine/Control_Panel/manage_shutdown to close Zope down.

Obviously you will need to authenticate in some way, and this depends on
what sort of user management you have set up.  You could for instance, if
using normal web authentication, pass the user/password on the url like so
http://user:pass@mymachine/Control_Panel/manage_restart.

hth

Phil
[EMAIL PROTECTED]

- Original Message -
From: "robert at rocad" <[EMAIL PROTECTED]>
To: "zope-dev" <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 9:41 AM
Subject: [Zope-dev] how can I stop zope through ftp?


> Hi there,
> I am looking for a way to stop zope through FTP.
>
> Why?
> I would like to have a button on my (Windows) desktop I can push to
restart
> zope without leaving Zopes current setup.
>
> thanks
> Robert
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Tracebacks( was can't use manage_access (security/Roles) in ZOPE2.3.1b3)

2001-04-09 Thread Chris Withers

Marcus Schopen wrote:
> 
> 
> Traceback (innermost last):
>   File /home/zope/Zope/lib/python/ZPublisher/Publish.py, line 223, in
> publish_module

Any chance of seeing the error type and value for this traceback? You've chopped
off the most useful bits..

(that said, I really don't know why Zope does that to the traceback, why can't
it just leave it like a normal ppython one? :-S)

Chris

PS: Spamming zope-announce with that post wasn't very helpful :-(

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Follow-up: Zope 2.3.1 and CoreSessionTracker 0.8

2001-04-09 Thread Stephan Richter

Ok,

after looking for a while, I found the restart problem, so I commented the 
following two lines out:
SessionData.py line 131
SessionData.py line 137

Note, this is NOT a solution to the problem, but makes it work. I ran the 
site through wget again with several threads and the session management 
seems to work. If one would like to get more info about the error, please 
let me know.

Regards,
Stephan

--
Stephan Richter
CBU - Physics and Chemistry Student
Web2k - Web Design/Development & Technical Project Management


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Catalog Indexes.

2001-04-09 Thread Erik Enge

I need some help with indexes.

I'm confused about what I can index in which Index.  Which index does not
remove numbers?  Which of them do I use to index a telephone number
(containing characters).  What about email addresses?  Special characters? 

*oink* Help...


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ZSQL methods seriously broken

2001-04-09 Thread Martijn Faassen

Hi there,

Type marshalling is seriously broken in ZSQL methods. The bug is a bit
subtle, though.  There are reports of this in the collector almost a month
old, and the severity of this bug is pretty high (could seriously disrupt Zope
upgrades to recent versions which apparently have this bug; I don't know
when it was introduced), so I'm making some extra noise about it here.

First how to reproduce the bug:

Create a ZSQL method 'my_method'.

Give it an argument:

foo:int

and some body.

Now make a DTML Method, 'test_my_method'

Do something like this following:



What should happen is a failure of 'my_method'. my_method however happily
continues, treating 'foo' as a string.

This can lead to subtle bugs; you push in a '0' string expecting the
type marshalling will make it a 0. Then you put a 
somewhere in your ZSQL template, and the condition will never be true, as
foo will always be a string.

This bug is relatively hard to discover; the ZSQL *test screen* does do
the proper marshalling, as the marshalling bits are placed in the test form
body (). And of course for most ZSQL
methods, you use ,  which does its own marshalling.

I've seen this bug in 2.3.0 and 2.3.1. From collector reports it also
looks like default arguments don't work either.

I hope the bug is hereby noted by the powers that be. :) The fix is
along the lines of using the ZPublisher Converters module in 
ZSQL methods somehow, I suspect.

Regards,

Martijn
 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Catalog Indexes.

2001-04-09 Thread Chris Withers

Erik Enge wrote:
> 
> I'm confused about what I can index in which Index.  Which index does not
> remove numbers? 

FieldIndex, KeyIndex

> Which of them do I use to index a telephone number

How would you like to search that index?

> (containing characters).  What about email addresses?  Special characters?

Likewise...

You probably want a FieldIndex but it might not be searchable in the way you
want...

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Erik Enge

On Thu, 5 Apr 2001, Michael R. Bernstein wrote:

> I'm trying to find out of there is a point where you start getting
> non-linear performance penalties for additional objects (storing,
> retreiving, or indexing).

I don't know, but I feel that is the case.  Actually, I know it is the
case, but I don't know what is causing it.  I know what isn't helping
though; CatalogAwareness.  I added 2000 objects with XML-RPC.  No other
queries were done during that period.  For each object about 70 DTML
Method/Documents were added.  The first couple of hundres went with a pace
of 2-3 seconds per object.  After that it started to get real slow, and
when I reached about 500 I was down to 5 seconds per object.  I killed
that script, rewrote it to only add 20-25 DTML Methods/Documents and
removed the CatalogAwareness and whoosh!  Under 1 second for each object
and it stayed like that for the entire 2000 objects.

The server is a 1GHz thingy with 1GB RAM.  It wasn't working too hard - it
seemed.
 
> Meanwhile Erik, what approach *did* your programmer take?

Well, the obviously more correct one. :)  He just made the files (that I
were going to index in a Catalog) stay on the filesystem and wrote some
nice regexps to do the searching I though I needed the speed of the
Catalog to do (yeah, yeah, I'm a rookie).

Thanks Jim! :)  
 
> I'll look forward to it.

Ok, and you know what to do if you haven't heard from me and the year is
not 2001 any more ;)


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Catalog Indexes.

2001-04-09 Thread Erik Enge

[observe the speed of Chris replying... *astounded* :)]

On Mon, 9 Apr 2001, Chris Withers wrote:

> Erik Enge wrote:
> > 
> > I'm confused about what I can index in which Index.  Which index does not
> > remove numbers? 
> 
> FieldIndex, KeyIndex

Wow, KeyIndex?  Is this a new one?  Or did you mean KeywordIndex?
 
> > Which of them do I use to index a telephone number
> 
> How would you like to search that index?

I'd like to find this telephone number (it is a string...): +44 1234
123456.
 
> Likewise...

As above, passing the string to searchResults; "[EMAIL PROTECTED]" f ex.
 
> You probably want a FieldIndex but it might not be searchable in the
> way you want...

Which one would?


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Follow-up: Zope 2.3.1 and CoreSessionTracker 0.8

2001-04-09 Thread Chris McDonough

Did you specify onstart and onend events in the data manager?

- Original Message -
From: "Stephan Richter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 5:32 AM
Subject: [Zope-dev] Follow-up: Zope 2.3.1 and CoreSessionTracker 0.8


> Ok,
>
> after looking for a while, I found the restart problem, so I commented the
> following two lines out:
> SessionData.py line 131
> SessionData.py line 137
>
> Note, this is NOT a solution to the problem, but makes it work. I ran the
> site through wget again with several threads and the session management
> seems to work. If one would like to get more info about the error, please
> let me know.
>
> Regards,
> Stephan
>
> --
> Stephan Richter
> CBU - Physics and Chemistry Student
> Web2k - Web Design/Development & Technical Project Management
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Zopista

> I don't know, but I feel that is the case.  Actually, I know it is the
> case, but I don't know what is causing it.  I know what isn't helping
> though; CatalogAwareness.  I added 2000 objects with XML-RPC.  No other
> queries were done during that period.  For each object about 70 DTML
> Method/Documents were added.  The first couple of hundres went with a pace
> of 2-3 seconds per object.  After that it started to get real slow, and
> when I reached about 500 I was down to 5 seconds per object.  I killed
> that script, rewrote it to only add 20-25 DTML Methods/Documents and
> removed the CatalogAwareness and whoosh!  Under 1 second for each object
> and it stayed like that for the entire 2000 objects.

Hear, hear. The cost of the incremental cataloguing is horrific. One of our
developers when we started with Zope a year ago wrote a great script that
imported a bunch, restarted zope, packed it, restarted it, imported a bunch
more to get optimal performance. We dont do it like that any more ;)

--
  Andy McKay



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Chris Withers

Zopista wrote:
> 
> Hear, hear. The cost of the incremental cataloguing is horrific. One of our
> developers when we started with Zope a year ago wrote a great script that
> imported a bunch, restarted zope, packed it, restarted it, imported a bunch
> more to get optimal performance. We dont do it like that any more ;)

Doesn't the new catalog/btree implementation fix this?

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Catalog Indexes.

2001-04-09 Thread Zopista

> > I'd like to find this telephone number (it is a string...): +44 1234
> > 123456.
>
> But no partial matching? Use a FieldIndex...
> If you want partial matching you're fu... not in a very good position ;-)

Theres a cool hack to Splitter.c by Jason Spisak that doesnt remove numbers
and punctuation from the Catalog. I make no promises since I haven't tried
it. That should enable you to make it a text field and then do globbing...

--
  Andy McKay



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Catalog Indexes.

2001-04-09 Thread Chris Withers

Erik Enge wrote:
> 
> Wow, KeyIndex?  Is this a new one?  Or did you mean KeywordIndex?

Bleugh... KeywordIndex :-)

> > > Which of them do I use to index a telephone number
> >
> > How would you like to search that index?
> 
> I'd like to find this telephone number (it is a string...): +44 1234
> 123456.

But no partial matching? Use a FieldIndex...
If you want partial matching you're fu... not in a very good position ;-)

> > Likewise...
> 
> As above, passing the string to searchResults; "[EMAIL PROTECTED]" f ex.

FieldIndex...

> > You probably want a FieldIndex but it might not be searchable in the
> > way you want...
> 
> Which one would?

There is a proposal for drop-in indexes on dev.zope.org...

*grinz*

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Performance of Medusa ( Zope )

2001-04-09 Thread Thomas Weholt

Hi,

Can anybody point to a review/benchmark/performance report on Zope and/or 
Medusa, preferrably compared against Apache and MS IIS.
Most interested in Medusa stripped of any Zope related packages, but I'll 
be happy for any info you can provide.

Thomas


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZSQL methods seriously broken

2001-04-09 Thread Martijn Faassen

[browsing through old versions of Zope]

I can't find any code that's supposed to do this in old versions of
Zope either. (I may be missing something, though)

If this feature was never there, I'd consider the ZSQL documentation 
(for instance in the Zope help) to be quite broken however. 

Regards,

Martijn


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Proxy Roles Problem

2001-04-09 Thread Chris Withers

Hi,

I need to have one anonymously accessible form in the middle of a restricted
area of a site.

This form needs to use lots of stuff that isn't usually available anonymously.
Fine thinks me, I'll give the anonymous form (a DTML method) a proxy role of
manager.
This doesn't help much, in goes ZDebug (thankyou, yet again Shane ;-)

Anyway, it appears that proxy roles are 'carried on'. So, I give my method a
proxy role, it calls another method which in turn calls another. That third
method gets caleld with Anonymous permissions again. 

What gives? Is this how its intended? It's not very helpful and means I haev to
give loads of extar mthods the proxy roles unneccessarily :-S

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Andy McKay

As I said this was a year ago... but still incremental cataloging is very
expensive.
--
  Andy McKay.


- Original Message -
From: "Chris Withers" <[EMAIL PROTECTED]>
To: "Zopista" <[EMAIL PROTECTED]>
Cc: "Erik Enge" <[EMAIL PROTECTED]>; "Michael R. Bernstein"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 7:31 AM
Subject: Re: [Zope-dev] 27 million objects.


> Zopista wrote:
> >
> > Hear, hear. The cost of the incremental cataloguing is horrific. One of
our
> > developers when we started with Zope a year ago wrote a great script
that
> > imported a bunch, restarted zope, packed it, restarted it, imported a
bunch
> > more to get optimal performance. We dont do it like that any more ;)
>
> Doesn't the new catalog/btree implementation fix this?
>
> cheers,
>
> Chris
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Andy McKay

Any cataloguing and un-cataloguing of an object is expensive, c'mon you are
changing all the indices, vocabulary and so on. You never notice it normally
for 1 - 10 things, but run an import script of 1 and catalog each object
as it gets added (rather than all of them at the end) and you'll notice the
difference. (This script was cataloguing 250,000 mail messages, one at a
time. Big no-no)
--
  Andy McKay.


- Original Message -
From: "Chris Withers" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>
Cc: "Erik Enge" <[EMAIL PROTECTED]>; "Michael R. Bernstein"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 10:52 AM
Subject: Re: [Zope-dev] 27 million objects.


> Andy McKay wrote:
> >
> > As I said this was a year ago... but still incremental cataloging is
very
> > expensive.
>
> How come? I always thought this was one of Zope's strong points as opposed
to,
> say, Lotus Notes' batch view buildign paradigm...
>
> cheers,
>
> Chris
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ZODBCA questions...

2001-04-09 Thread Andy McKay

Im getting some performance issues with my sites, im connecting Zope to a
SQL Server (not using ZEO). I've got suspicion, but no proof, that its
ZODBCA that is the problem. Does anyone have experiences with this on large
sites and / or a suggestion to replace it?

Cheers.
--
  Andy McKay.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Chris McDonough

The improvements to incremental indexing in the recent-release catalog has
been more along the lines of reducing the amount of churn resulting in
out-of-control ZODB size growth than improved speed.


- Original Message -
From: "Andy McKay" <[EMAIL PROTECTED]>
To: "Chris Withers" <[EMAIL PROTECTED]>
Cc: "Erik Enge" <[EMAIL PROTECTED]>; "Michael R. Bernstein"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 1:59 PM
Subject: Re: [Zope-dev] 27 million objects.


> Any cataloguing and un-cataloguing of an object is expensive, c'mon you
are
> changing all the indices, vocabulary and so on. You never notice it
normally
> for 1 - 10 things, but run an import script of 1 and catalog each
object
> as it gets added (rather than all of them at the end) and you'll notice
the
> difference. (This script was cataloguing 250,000 mail messages, one at a
> time. Big no-no)
> --
>   Andy McKay.
>
>
> - Original Message -
> From: "Chris Withers" <[EMAIL PROTECTED]>
> To: "Andy McKay" <[EMAIL PROTECTED]>
> Cc: "Erik Enge" <[EMAIL PROTECTED]>; "Michael R. Bernstein"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, April 09, 2001 10:52 AM
> Subject: Re: [Zope-dev] 27 million objects.
>
>
> > Andy McKay wrote:
> > >
> > > As I said this was a year ago... but still incremental cataloging is
> very
> > > expensive.
> >
> > How come? I always thought this was one of Zope's strong points as
opposed
> to,
> > say, Lotus Notes' batch view buildign paradigm...
> >
> > cheers,
> >
> > Chris
> >
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Chris Withers

Andy McKay wrote:
> 
> As I said this was a year ago... but still incremental cataloging is very
> expensive.

How come? I always thought this was one of Zope's strong points as opposed to,
say, Lotus Notes' batch view buildign paradigm...

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Chris Withers

Andy McKay wrote:
> 
> Any cataloguing and un-cataloguing of an object is expensive, c'mon you are
> changing all the indices, vocabulary and so on. 

Yup...

> You never notice it normally
> for 1 - 10 things, but run an import script of 1 and catalog each object
> as it gets added (rather than all of them at the end) and you'll notice the
> difference. (This script was cataloguing 250,000 mail messages, one at a
> time. Big no-no)

Hmmm... I see your point now, and I think it's along the lines of "indexing
250,000 objects is slow, it's just when you take the performance hit".
Correct?

If so, then I don't really understand:
> Hear, hear. The cost of the incremental cataloguing is horrific.

How does this cost differ from non-incremenetal cataloguig?

Erm... actually... what is non-incremental cataloguing and how do you do it?

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Michael R. Bernstein

Andy McKay wrote:
> 
> Any cataloguing and un-cataloguing of an object is expensive, c'mon you are
> changing all the indices, vocabulary and so on. You never notice it normally
> for 1 - 10 things, but run an import script of 1 and catalog each object
> as it gets added (rather than all of them at the end) and you'll notice the
> difference. (This script was cataloguing 250,000 mail messages, one at a
> time. Big no-no)

Perhaps I expressed myself poorly.

What I am watching out for is evidence that adding,
indexing, reindexing, or retreiving *a single object* (or a
small set of objects), takes longer if there are more
objects stored/indexed already.

In other words, does the time to
store/index/reindex/retreive an object change (for the
worse) depending on whether there are 10,000 objects,
100,000 objects or 10,000,000 objects stored/cataloged in
the ZODB/ZCatalog?

Previously, the fact that searching performance suffered
depending on a combination of number of total objects and
the size of the result set (irrespective of the batch size,
apparently), came to light, and has apparently been fixed.
Now searching performance scales with the number of
cataloged objects.

So, are there any non-linear gotchas waiting for me?

Michael Bernstein.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ZPatterns Attribute Provider Problem

2001-04-09 Thread Christian Scholz

Hi everybody!

I am trying to write some attribute provider for storing data inside
an SQL table as I am bored of typing parameter lists over and over
again (e.g. in every ZSQL method, in every SkinScript method etc.)

The problem now is that adding a new row to the table (and thus adding
a new object to the rack) is working well but updating an object does not.
Basically the main problem is that _objectChanged is not called in my provider.

What I did is the following:

- If an attribute of the propsheet is changed, _SetAttributeFor is called
  and stores it into the cache (as I don't want to update the database for
  every attribute change).

- _objectChanged is then supposed to create an sql query and execute it.
  This - as said - is actually not happening, as the whole method is not called.

- My namesForRegistration looks like this:

def namesForRegistration(self,container):
""" return names for registration """
return {
'provides':('handlers','attributes'),
'getattr': self._attribs.keys(),
'setattr': self._attribs.keys(),
'delattr': self._attribs.keys()
}

  with self._attribs containing the attributes my provider is responsible for.

So is there any reason why _objectChanged is not called? Actually I am a bit
confused when reading the ZPatterns source which should call it.. ;-)
So which are the conditions under which it's supposed to be called?
(_objectAdded() as said before is called actually..)

I hope someone can help me :)

cheers,
  Christian

-- 
COM.lounge  http://comlounge.net/
communication & design [EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZPatterns Attribute Provider Problem

2001-04-09 Thread Christian Scholz


Well, sorry for mailing to quickly, but removing 

_objectChanging() from my class solved the problem. My version simply 
wasn't setting the right status to the transaction.

(though I think that I had a reason for adding it some time ago..)

But maybe it's working now.. (but it seems so)

-- christian


On Mon, Apr 09, 2001 at 07:31:41PM +0200, Christian Scholz wrote:
> Hi everybody!
> 
> I am trying to write some attribute provider for storing data inside
> an SQL table as I am bored of typing parameter lists over and over
> again (e.g. in every ZSQL method, in every SkinScript method etc.)
> 
> The problem now is that adding a new row to the table (and thus adding
> a new object to the rack) is working well but updating an object does not.
> Basically the main problem is that _objectChanged is not called in my provider.
> 
> What I did is the following:
> 
> - If an attribute of the propsheet is changed, _SetAttributeFor is called
>   and stores it into the cache (as I don't want to update the database for
>   every attribute change).
> 
> - _objectChanged is then supposed to create an sql query and execute it.
>   This - as said - is actually not happening, as the whole method is not called.
> 
> - My namesForRegistration looks like this:
> 
> def namesForRegistration(self,container):
>   """ return names for registration """
>   return {
>   'provides':('handlers','attributes'),
>   'getattr': self._attribs.keys(),
>   'setattr': self._attribs.keys(),
>   'delattr': self._attribs.keys()
>   }
> 
>   with self._attribs containing the attributes my provider is responsible for.
> 
> So is there any reason why _objectChanged is not called? Actually I am a bit
> confused when reading the ZPatterns source which should call it.. ;-)
> So which are the conditions under which it's supposed to be called?
> (_objectAdded() as said before is called actually..)
> 
> I hope someone can help me :)
> 
> cheers,
>   Christian
> 
> -- 
> COM.lounge  http://comlounge.net/
> communication & design [EMAIL PROTECTED]
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )

-- 
COM.lounge  http://comlounge.net/
communication & design [EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Chris McDonough

> In other words, does the time to
> store/index/reindex/retreive an object change (for the
> worse) depending on whether there are 10,000 objects,
> 100,000 objects or 10,000,000 objects stored/cataloged in
> the ZODB/ZCatalog?

I don't think it makes much of a difference.  At least not a big one.

> Previously, the fact that searching performance suffered
> depending on a combination of number of total objects and
> the size of the result set (irrespective of the batch size,
> apparently), came to light, and has apparently been fixed.
> Now searching performance scales with the number of
> cataloged objects.

I think searching performance has improved significantly... for instance,
searching an indexed term inside the text of copies of the Zope mail list is
very fast now.  It wasn't actually that bad before, but it's faster now.

> So, are there any non-linear gotchas waiting for me?

I don't think so...




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODBCA questions...

2001-04-09 Thread Andy McKay

Well I havent been able to prove its ZODBCA yet... the other alternative is
perlDBI but that has a small performance hit.

Cheers.
--
  Andy McKay.


- Original Message -
From: "Bryan Baszczewski" <[EMAIL PROTECTED]>
To: "'Andy McKay'" <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 11:28 AM
Subject: RE: [Zope-dev] ZODBCA questions...


> Andy, We experienced bigtime problems with ZODBC too.  ZODBC locked all
> other requests out when waiting for a complex query.  Upgrade to ZmxODBC
> database adapter (search on zope.org to find it).  We found ZmxODBC to be
> alot better without locking requests.  BUT...it costs money(!)
> and seems no one else uses this though as SQL Server isnt widely supported
> by Digital Creations.  A shame really being that SQL Server is an
excellent
> database.
>
> For verificaion of your problem, check out the plans for ZODBC the
"Database
> Adapter RoadMap".
>
> -Original Message-
> From: Andy McKay [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 09, 2001 1:46 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope-dev] ZODBCA questions...
>
>
> Im getting some performance issues with my sites, im connecting Zope to a
> SQL Server (not using ZEO). I've got suspicion, but no proof, that its
> ZODBCA that is the problem. Does anyone have experiences with this on
large
> sites and / or a suggestion to replace it?
>
> Cheers.
> --
>   Andy McKay.
>
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Andy McKay

> Andy McKay wrote:
> >
> > Any cataloguing and un-cataloguing of an object is expensive, c'mon you
are
> > changing all the indices, vocabulary and so on. You never notice it
normally
> > for 1 - 10 things, but run an import script of 1 and catalog each
object
> > as it gets added (rather than all of them at the end) and you'll notice
the
> > difference. (This script was cataloguing 250,000 mail messages, one at a
> > time. Big no-no)
>
> Perhaps I expressed myself poorly.

Yeah I think me and Chris have wandered off the point. Since my experience
with a large catalog was a year ago I will shut up until I have something
valuable to add :)

Cheers.
--
  Andy McKay.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODBCA questions...

2001-04-09 Thread Andy McKay

According to the Database Adapter RoadMap
(http://www.zope.org/Members/petrilli/DARoadmap), ZODBCA will be level 2
compliant at one point. Yet ZODBCA hasnt been touched since 1999. Is ZODBCA
level 2 compliant?

Cheers.
--
  Andy McKay.


- Original Message -
From: "Bryan Baszczewski" <[EMAIL PROTECTED]>
To: "'Andy McKay'" <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 11:28 AM
Subject: RE: [Zope-dev] ZODBCA questions...


> Andy, We experienced bigtime problems with ZODBC too.  ZODBC locked all
> other requests out when waiting for a complex query.  Upgrade to ZmxODBC
> database adapter (search on zope.org to find it).  We found ZmxODBC to be
> alot better without locking requests.  BUT...it costs money(!)
> and seems no one else uses this though as SQL Server isnt widely supported
> by Digital Creations.  A shame really being that SQL Server is an
excellent
> database.
>
> For verificaion of your problem, check out the plans for ZODBC the
"Database
> Adapter RoadMap".
>
> -Original Message-
> From: Andy McKay [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 09, 2001 1:46 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope-dev] ZODBCA questions...
>
>
> Im getting some performance issues with my sites, im connecting Zope to a
> SQL Server (not using ZEO). I've got suspicion, but no proof, that its
> ZODBCA that is the problem. Does anyone have experiences with this on
large
> sites and / or a suggestion to replace it?
>
> Cheers.
> --
>   Andy McKay.
>
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Windows FAQ / Help area?

2001-04-09 Thread Andy McKay

Just thinking how many little tidbits I know related to running Zope on
Windows that are very platform and installation specific. Do people think it
would be a good idea to start at least a wiki / faq section somewhere
covering this? Do other windows users think there is enough stuff to put in
there?

Things I can think of off the top of my head: windows service, getting
stdout when running as a service and I was about to add ZEO, but thats been
fixed...

Cheers.
--
  Andy McKay.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] ZODBCA questions...

2001-04-09 Thread Bryan Baszczewski

After reading this about Level 2:  <<"While a sub-optimal solution, it
should be usable on any application that has minimal, or infrequent,
database access">>

Then about the ZODBC DA itself:  <<"Long term progress. See information
below on the future of a X/Open CLI interface DA." ...blah blah blah...
"we will be transitioning to a new design for the ODBC DA, as well as
integrating support for IBM DB2 into the same DA.">>

I would not use ZODBC & SQL Server for my critical business apps as it looks
like its going away.

-Original Message-
From: Andy McKay [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 3:20 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope-dev] ZODBCA questions...


According to the Database Adapter RoadMap
(http://www.zope.org/Members/petrilli/DARoadmap), ZODBCA will be level 2
compliant at one point. Yet ZODBCA hasnt been touched since 1999. Is ZODBCA
level 2 compliant?

Cheers.
--
  Andy McKay.


- Original Message -
From: "Bryan Baszczewski" <[EMAIL PROTECTED]>
To: "'Andy McKay'" <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 11:28 AM
Subject: RE: [Zope-dev] ZODBCA questions...


> Andy, We experienced bigtime problems with ZODBC too.  ZODBC locked all
> other requests out when waiting for a complex query.  Upgrade to ZmxODBC
> database adapter (search on zope.org to find it).  We found ZmxODBC to be
> alot better without locking requests.  BUT...it costs money(!)
> and seems no one else uses this though as SQL Server isnt widely supported
> by Digital Creations.  A shame really being that SQL Server is an
excellent
> database.
>
> For verificaion of your problem, check out the plans for ZODBC the
"Database
> Adapter RoadMap".
>
> -Original Message-
> From: Andy McKay [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 09, 2001 1:46 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope-dev] ZODBCA questions...
>
>
> Im getting some performance issues with my sites, im connecting Zope to a
> SQL Server (not using ZEO). I've got suspicion, but no proof, that its
> ZODBCA that is the problem. Does anyone have experiences with this on
large
> sites and / or a suggestion to replace it?
>
> Cheers.
> --
>   Andy McKay.
>
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] Windows FAQ / Help area?

2001-04-09 Thread Bryan Baszczewski

How about database access (i.e. ODBC adapters)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Andy McKay
Sent: Monday, April 09, 2001 3:51 PM
To: [EMAIL PROTECTED]
Subject: [Zope-dev] Windows FAQ / Help area?


Just thinking how many little tidbits I know related to running Zope on
Windows that are very platform and installation specific. Do people think it
would be a good idea to start at least a wiki / faq section somewhere
covering this? Do other windows users think there is enough stuff to put in
there?

Things I can think of off the top of my head: windows service, getting
stdout when running as a service and I was about to add ZEO, but thats been
fixed...

Cheers.
--
  Andy McKay.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Windows FAQ / Help area?

2001-04-09 Thread Andy McKay

when I find the answer... ;)
--
  Andy McKay.


- Original Message -
From: "Bryan Baszczewski" <[EMAIL PROTECTED]>
To: "'Andy McKay'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 1:10 PM
Subject: RE: [Zope-dev] Windows FAQ / Help area?


> How about database access (i.e. ODBC adapters)
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Andy McKay
> Sent: Monday, April 09, 2001 3:51 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope-dev] Windows FAQ / Help area?
>
>
> Just thinking how many little tidbits I know related to running Zope on
> Windows that are very platform and installation specific. Do people think
it
> would be a good idea to start at least a wiki / faq section somewhere
> covering this? Do other windows users think there is enough stuff to put
in
> there?
>
> Things I can think of off the top of my head: windows service, getting
> stdout when running as a service and I was about to add ZEO, but thats
been
> fixed...
>
> Cheers.
> --
>   Andy McKay.
>
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] Windows FAQ / Help area?

2001-04-09 Thread Loren Stafford

Especially, how to set up permissions on the server machine and file servers
so that database connections and Local File Systems work. One problem I have
now and haven't found a good solution to is how to ensure that, when Zope is
started at (NT 4) system initialization, it has the right permissions for
all the DB connections, NFS connections, and Local File Systems.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Bryan Baszczewski
> Sent: Monday, April 09, 2001 13:11
> To: 'Andy McKay'; [EMAIL PROTECTED]
> Subject: RE: [Zope-dev] Windows FAQ / Help area?
>
>
> How about database access (i.e. ODBC adapters)
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Andy McKay
> Sent: Monday, April 09, 2001 3:51 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope-dev] Windows FAQ / Help area?
>
>
> Just thinking how many little tidbits I know related to running Zope on
> Windows that are very platform and installation specific. Do
> people think it
> would be a good idea to start at least a wiki / faq section somewhere
> covering this? Do other windows users think there is enough stuff
> to put in
> there?
>
> Things I can think of off the top of my head: windows service, getting
> stdout when running as a service and I was about to add ZEO, but
> thats been
> fixed...
>
> Cheers.
> --
>   Andy McKay.
>
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] Windows FAQ / Help area?

2001-04-09 Thread Bryan Baszczewski

Your answer: http://www.zope.org/Members/djay/ZmxODBC

-Original Message-
From: Andy McKay [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 4:02 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Zope-dev] Windows FAQ / Help area?


when I find the answer... ;)
--
  Andy McKay.


- Original Message -
From: "Bryan Baszczewski" <[EMAIL PROTECTED]>
To: "'Andy McKay'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 1:10 PM
Subject: RE: [Zope-dev] Windows FAQ / Help area?


> How about database access (i.e. ODBC adapters)
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Andy McKay
> Sent: Monday, April 09, 2001 3:51 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope-dev] Windows FAQ / Help area?
>
>
> Just thinking how many little tidbits I know related to running Zope on
> Windows that are very platform and installation specific. Do people think
it
> would be a good idea to start at least a wiki / faq section somewhere
> covering this? Do other windows users think there is enough stuff to put
in
> there?
>
> Things I can think of off the top of my head: windows service, getting
> stdout when running as a service and I was about to add ZEO, but thats
been
> fixed...
>
> Cheers.
> --
>   Andy McKay.
>
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Bug in ZMI?

2001-04-09 Thread Dieter Maurer

E. Seifert writes:
 > I think I encountered a problem with the ZMI.
 > Everytime I added a new property to the memory cache object the list doesn't 
 > display them correctly.
 > They are concatenated; no space between them.
 > 
 > Is this a known bug?
It is a bug - in the latest CVS, too.

Put it into the collector.

A patch is to change "Products/StandardCacheManagers/dtml/propsRCM.dtml"
from:

&dtml-sequence-item;

to 

&dtml-sequence-item;



The newline before "" is essential.


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Proxy Roles Problem

2001-04-09 Thread Dieter Maurer

Chris Withers writes:
 > 
 > Anyway, it appears that proxy roles are [not] 'carried on'
 > 
 > What gives? Is this how its intended?
It is intended.
Was changed with the big Zope 2.2 security policy shakeup.

You may find some explanation for the change on zope.org.



Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODBCA questions...

2001-04-09 Thread Dieter Maurer

Andy McKay writes:
 > According to the Database Adapter RoadMap
 > (http://www.zope.org/Members/petrilli/DARoadmap), ZODBCA will be level 2
 > compliant at one point. Yet ZODBCA hasnt been touched since 1999. Is ZODBCA
 > level 2 compliant?
Recent posts to the list suggest that not (--> mail archives).

ZmxODBCDA was said to solve the problem


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Objects, Roles and Permissions

2001-04-09 Thread Danny William Adair

Hello warriors,

what's the fastest way to find out whether a specific role has a specific
permission on a specific object? What's the fastest way to find out if it's
acquired?

Even more interesting:
How would I find out whether a specific role has a specific permission on a
specific object, _taking_acquired_rights_into_account_??? In other words
(management screen): "View" permission is not checked for the Anonymous
role, but acquired. Therefore the "Anonymous" role maybe _does_ have the
permission to "View" this object, through acquisition. Would I have to climb
up the ladder manually and check every parent until acquisition has been
"turned off", or is there some function - even if it's only available for an
external method - that already does this work?

I looked through the ZMI pages (and the .py's under
"lib/python/AccessControl") but couldn't find anything useful for this
purpose. Iterating through permission_settings takes too long and I don't
know how to access the specific roles/permissions directly (by name), mainly
because mapping constructions like "p199r0" are not very handy...

Thank you very much in advance for your help (dtml, pyhton, or docs I didn't
see),

Danny


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] I am looking for a DragDrop target.

2001-04-09 Thread robert at rocad

Hi there,
I would like to be able to allow people to upload files to a zope site by
dropping them on a drop target someplace on a webbrowser showing the zope
site.

Can anyone point me towards a solution. Is there an example someplace?

Thank you

Robert



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] I am looking for a DragDrop target.

2001-04-09 Thread Loren Stafford

I'm just speculating, because I've never done this, but I do remember that
Javascript has a event handler named "onDragDrop". Perhaps you could use
that to fill in the name of the file object.

-- Loren

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of robert at rocad
> Sent: Monday, April 09, 2001 15:13
> To: zope-dev
> Subject: [Zope-dev] I am looking for a DragDrop target.
>
>
> Hi there,
> I would like to be able to allow people to upload files to a zope site by
> dropping them on a drop target someplace on a webbrowser showing the zope
> site.
>
> Can anyone point me towards a solution. Is there an example someplace?
>
> Thank you
>
> Robert
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Tracking memory leak

2001-04-09 Thread Andy McKay

Does anyone have advice for tracking (apparent) memory leaks other than
sitting watching DebugInfo?

Cheers.
--
  Andy McKay.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] 27 million objects.

2001-04-09 Thread Sin Hang Kin

Concerning Zcatalog:

1. Search of vocabulary is fully matched, partial search, trancate search or
fuzzy search will be useful for searcher.
2. If we catalog all things in one catalog, then we need to make filter when
we want to search on one particular portation.
3. I would like to suggest :

   putting cataloger in branches and make them catalog only those they were
interested. for example, if we put catalog in every branch of tree, then
they catalog only that branch.

  catalog can be set to propagate their collection into higher level. This
can be done in background. Then a search on a higher level will result in :
1. result in that catalog which meet the search specification and result
from the lower level of those the higher level does not known as which match
the search specification.

In such settings, for example, we can arrange the catalog into multi-layer
or have catalog specialize in one section. And have the propagate
hierarchical which they update their upper level catalog in batch. The user
is allow to search in a level and get all results up to that level and
below.

for example, in zope.org, we can put catalog in every document level, which
catalog one document and one mother catalog which combine all catalogs from
every document and one level up to handle all zope site. The we can search
specifically in whatever level we want.

It seems very difficult for all the catalog hierarchical to share their
storage, so there will be some storage inefficent. But this can provide the
necessary scalability.



Rgs,

Kent Sin
-
kentsin.weblogs.com
kentsin.imeme.net


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] ZUserFolder usage and development

2001-04-09 Thread Tim McLaughlin

Dave,
1.  I say sync because UserFolder keeps its objects in an attribute called
"data" (list of Users) whereas ObjectManager does not.  The 'name' attribute
is no longer necessary because I usee the id of the object and allowing it
to be specified presents potential discord.

2.  Correct, you're supposed to check for that in your constructor, but this
is a new Product and could obviously be changed.  In fact, I'm thinking of
eliminating the constructor params altogether and allowing them to be set
later.  manage_editUser does check that password and confirm match since in
fact it calls the Super.

3.  I'm gonna pitch this out.  say it all to the benefit of all.

Incidentally, great working with you on this.  Excellent feedback, and your
catchin' on quickly (hooray!  another infected by the Zope bug).

Tim

-Original Message-
From: David Hassalevris
To: Tim McLaughlin
Sent: 4/9/01 4:20 PM
Subject: Re: More progress - ignore last message

Tim,
(1)
I notice that in zUserBase you omit "name" from 

def __init__   Your comment says
# name parameter allows for id and name to unsync
# so it is no longer

Can you clarify this?
Note: I noticed that the standard acl-user folder throws an error if
duplicate name is added.  Wouldnt that "default" behavior protect the
linkage (or sync) between your class and its related user object?  

(2) I also notice that while I can sucessfully add a new user via z User
Folder ... it omits password and confirmation checking.  Is this me or
is this in your code?

(3) Trying to solved problems like this raises alot of interesting Zope
questions.
Do you mind if I throw some of the issues that occur to me out to the
zope list?  
Best,
David

Tim McLaughlin wrote:
> 
> cool.  I was just about to form some vague conjectures as to what your
> problem was... but good luck and lemme know if issues come up.
> 
> incidentally, don't use 'name', 'roles', 'domains', or 'authenticate'
as
> property names or methods (clash with base class).
> 
> Thanks,
> Tim
> 
> -Original Message-
> From: David Hassalevris [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, April 08, 2001 1:21 PM
> To: Tim McLaughlin
> Subject: More progress - ignore last message
> 
> Tim,
> It finally occured to me that in order to obtain User attributes not
> stored in a "property sheet" I simply had to use things like
> "getUserName()"
> Ring! methods from the base classes are available!
> 
> Ill update you as things progress.
> David
> 
> Tim McLaughlin wrote:
> >
> > David,
> >
> > Try it again if you have previously (0.8.0).  Includes more
instructions
> > (thanks to some testing of my collegues) and fixes.
> >

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] RE: your mail

2001-04-09 Thread Randall F. Kern

Read committed is faster, but I have not done any tests to know how much
faster.  Read committed mode doesn't support concurrent updates either,
but fails silently.  In other words, given to concurrent queries:

update foo set a = a + 1
update foo set a = a + 2

Assuming these overlap, and a starting value of 0 for "a", read
committed mode would result in "a" either being 1 or 2; serializable
mode (with my patch) would result in "a" getting set to 3.

-Randy

> -Original Message-
> From: Federico Di Gregorio [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 09, 2001 1:23 AM
> To: Randall F. Kern
> Cc: [EMAIL PROTECTED]
> Subject: Re: your mail
> 
> 
> Scavenging the mail folder uncovered Randall F. Kern's letter:
> 
> [snip]
> > Concurrent updates are not supported in the serializable transaction
> > mode; if one transaction tries to update (or delete) a row that has
> > already been updated by a concurrent uncommitted 
> transaction, the second
> > transaction will fail with a "concurrent update" error.
> 
> mmm... are they supported in the read commited mode? if yes it will be
> easy to add this mode as on option to psycopg cursors and use 
> it in zope.
> do you know how much faster would it be compared to the 
> serialized mode?
> 
> > Given that the default transaction mode for these DAs is 
> Serializable,
> > and Zope has this nifty support for ConflictErrors and retrying
> > transactions already, I propose Postgres DAs should convert the
> > concurrent update serialization errors into ConflictErrors
> > automatically.
> > 
> > I've been running this way for a few days, and everything 
> seems great.
> > Any reasons why this might be good/bad/ugly very welcome.  
> (Like: is it
> > safe to throw a ConflictError at any random time during processing?
> > >From a quick glance at ZODB it seems they are only thrown 
> at commit time
> > now)
> > 
> > Here is a small patch to ZPsyccopgDA 0.5.1 that implements 
> this change:
> 
> thank you very much for the patch. i am waiting to know what 
> others think
> about it (i am not a ZODB expert) before we incorporate it.
> 
> ciao,
> federico
> 
> -- 
> Federico Di Gregorio
> MIXAD LIVE Chief of Research & Technology  
> [EMAIL PROTECTED]
> Debian GNU/Linux Developer & Italian Press Contact
> [EMAIL PROTECTED]
>Don't dream it. Be it. -- Dr. 
> Frank'n'further
> 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Objects, Roles and Permissions

2001-04-09 Thread richard

Danny William Adair wrote:
> what's the fastest way to find out whether a specific role has a specific
> permission on a specific object? What's the fastest way to find out if it's
> acquired?
> 
> Even more interesting:
> How would I find out whether a specific role has a specific permission on a
> specific object, _taking_acquired_rights_into_account_??? In other words
> (management screen): "View" permission is not checked for the Anonymous
> role, but acquired. Therefore the "Anonymous" role maybe _does_ have the
> permission to "View" this object, through acquisition. Would I have to climb
> up the ladder manually and check every parent until acquisition has been
> "turned off", or is there some function - even if it's only available for an
> external method - that already does this work?
> 
> I looked through the ZMI pages (and the .py's under
> "lib/python/AccessControl") but couldn't find anything useful for this
> purpose. Iterating through permission_settings takes too long and I don't
> know how to access the specific roles/permissions directly (by name), mainly
> because mapping constructions like "p199r0" are not very handy...

I whined about this a little while ago under the subject "Determining
Acquired Permissions?" on the 26th of March.

The standard manage_access doesn't display the actual acquired permissions,
just that they are acquired. Anyway, here's a code snippet I use to figure
the roles allowed to"View". Feel free to expand the method to other roles
and the full suite of permissions. The roles are obtained using
self.valid_roles(). The permissions are obtained using
self.ac_inherited_permissions(1). Spaces become underscores in permission
names.

def viewPermissions(self, acquired=0):
''' walk up the acquisition path to find a _View_Permission
attribute...  possibly _only_ the acquired permissions.
'''
chain = self.aq_chain
if acquired:
chain = chain[1:]
for self in chain:
if hasattr(self.aq_base, '_View_Permission'):
return self._View_Permission
return ['Manager']


As I stated in my last email on this subject, I'm really uncomfortable
using a 'private' attribute like _View_Permission in this way. I could see
no other way to get the information though...


 Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZODBCA questions...

2001-04-09 Thread Matthew T. Kromer

ZODBCA is on my list of things to evaluate freshing...  there is a good
chunk of code out there for a CLI interface.  One of the project wikis
mentions it somewhat, which I'll update on dev.zope.org as I get better
details.

The downside is I am not an NT evangelist; I'm more like a penguin in a
demilitarized zone.  Now, if we were talking SQL/DS on VM; I'd happily crank
out 370 asm bindings for REXX :)  I even used to have one of those cool
orange plasma tubes (but what you didn't probably know is that they were
SLOW to refresh.)


- Original Message -
From: "Andy McKay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 1:45 PM
Subject: [Zope-dev] ZODBCA questions...


> Im getting some performance issues with my sites, im connecting Zope to a
> SQL Server (not using ZEO). I've got suspicion, but no proof, that its
> ZODBCA that is the problem. Does anyone have experiences with this on
large
> sites and / or a suggestion to replace it?
>
> Cheers.
> --
>   Andy McKay.
>
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] ZPatterns sub-Specialist traversal

2001-04-09 Thread Michael R. Bernstein

With some help from the kind folks on #zope, this has been
solved.

"Michael R. Bernstein" wrote:
> 
> Here is what I've done:
> 
> ArchiveImages (Specialist)
>  defaultRack
>   traversal_method (Python Script)
>   traversal (SkinScript)
>  Renderings (sub-Specialist)
>   defaultRack

This was wrong in a couple of ways, here is how it needs to
be layed out:

ArchiveImages (Specialist)
 traversal_method (Python Script)
 defaultRack
  traversal (SkinScript)
 Renderings (sub-Specialist)
  defaultRack

As you can see, the Python Method needed to be moved from
within the Rack up into the Specialist.

> traversal_method has 'REQUEST, name' as parameters, and the
> following body:
> 
> return getattr(container.Renderings, name)

The body of the traversal_method needed to change in two
ways:

 if name in ['index_html', 'editInstanceForm',
'editInstance']:
 return getattr(context, name)
 else:
 return container.Renderings.getItem(name)

First, it needed to pass unmolested those methods of the
ArchiveImage that were needed. Second, Specialists
apparently don't support getattr(), so I needed to change
this to call getItem() instead.

> The 'traversal' SkinScript has the following body:
> 
> WITH SELF COMPUTE __bobo_traverse__=traversal_method

The SkinScript works fine as-is.

HTH,

Michael Bernstein.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Tracking memory leak

2001-04-09 Thread Chris McDonough

A painful, but effective way is to get a rough idea of what might be
leaking and then go disable code in the thing that you think is leaking
in large sections... I know this isn't very helpful, but it's true.

Andy McKay wrote:
> 
> Does anyone have advice for tracking (apparent) memory leaks other than
> sitting watching DebugInfo?
> 
> Cheers.
> --
>   Andy McKay.
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Objects, Roles and Permissions

2001-04-09 Thread Danny William Adair

Thank you very much, Richard! Cool!

Still...

>>> ...
>>> Feel free to expand the method to other roles
>>> and the full suite of permissions.
>>> ...

Other *roles*? Roles are what's coming back, isn't it?

>>> def viewPermissions(self, acquired=0):
>>> ''' walk up the acquisition path to find a _View_Permission
>>> attribute...  possibly _only_ the acquired permissions.
>>> '''
>>> chain = self.aq_chain
>>> if acquired:
>>> chain = chain[1:]
>>> for self in chain:
>>> if hasattr(self.aq_base, '_View_Permission'):
>>> return self._View_Permission
>>> return ['Manager']

"possibly _only_ the acquired permissions" - oops! Your snippet worked fine
_if_ the view permission was acquired by that object. As soon as I turned
off acquisition for the view permission of the object, it would still give
me the acquired roles (that in fact were'nt acquired).  What does the "if"
statement look like that would return the object's own roles for the View
Permission if acquisition was turned off? Naive Danny who doesn't know s...
tried to put

if hasattr(self.aq_base, '_View_Permission'):
return self._View_Permission

at the beginning of your code, but no effect. :-(

But now I see how to access specific permissions and read their content (do
I? I'll experiment with it), thank you very much! I will put a
string.replace on top and pass the Permission to examine by string
parameter, and call that whole stuff "getAllowedRoles".

A "getGrantedPermissions" for examining a role should work similarly, right?

def ac_inherited_permissions(self, all=0):

set all to 1 and then... iterate through the list (tuple or list? list of
tuples?) and check every "_current_Permission" if it contains the role?

Thx once again,
Danny

btw: Isn't return['Manager'] at the end of your code obsolete (but safe)? Or
is there anything special going on at the root level
(isTopLevelPrincipiaApplicationObject)?


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] standard_error_message manipulation

2001-04-09 Thread Dyon Balding

Hi,

As part of a large python product I wanted to modify the normal
"Zope Error" standard_error_message page.

Most exceptions will be caught in the code, and therefore those
that do get through and cause an error message to be displayed
to the user probably indicate a bug in our code.  I would like
to give the user the ability to submit the details of the exception
along with their own information as a bug report.

I created my own standard_error_message, and wanted it to contain
a form with the values of error_value and error_tb among
others.  It however appears that the values of these variables get
rendered into HTML much earlier than desired and therefore aren't
very readable in a bug report.

Is there a better approach to this problem? or a work around?

thanks
-d

-- 
Dyon Balding <[EMAIL PROTECTED]>

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] standard_error_message manipulation

2001-04-09 Thread Andy McKay

I run error_value through a simple python script to get the original message
back again :)

Cheers.
--
  Andy McKay.


- Original Message -
From: "Dyon Balding" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 9:44 PM
Subject: [Zope-dev] standard_error_message manipulation


> Hi,
>
> As part of a large python product I wanted to modify the normal
> "Zope Error" standard_error_message page.
>
> Most exceptions will be caught in the code, and therefore those
> that do get through and cause an error message to be displayed
> to the user probably indicate a bug in our code.  I would like
> to give the user the ability to submit the details of the exception
> along with their own information as a bug report.
>
> I created my own standard_error_message, and wanted it to contain
> a form with the values of error_value and error_tb among
> others.  It however appears that the values of these variables get
> rendered into HTML much earlier than desired and therefore aren't
> very readable in a bug report.
>
> Is there a better approach to this problem? or a work around?
>
> thanks
> -d
>
> --
> Dyon Balding <[EMAIL PROTECTED]>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] standard_error_message manipulation

2001-04-09 Thread Dyon Balding

argh! that wasn't the answer i was looking for :)

-d

On Mon, Apr 09, 2001 at 09:57:36PM -0700, Andy McKay wrote:
> I run error_value through a simple python script to get the original message
> back again :)
> 
> Cheers.
> --
>   Andy McKay.
> 
> 
> - Original Message -
> From: "Dyon Balding" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 09, 2001 9:44 PM
> Subject: [Zope-dev] standard_error_message manipulation
> 
> 
> > Hi,
> >
> > As part of a large python product I wanted to modify the normal
> > "Zope Error" standard_error_message page.
> >
> > Most exceptions will be caught in the code, and therefore those
> > that do get through and cause an error message to be displayed
> > to the user probably indicate a bug in our code.  I would like
> > to give the user the ability to submit the details of the exception
> > along with their own information as a bug report.
> >
> > I created my own standard_error_message, and wanted it to contain
> > a form with the values of error_value and error_tb among
> > others.  It however appears that the values of these variables get
> > rendered into HTML much earlier than desired and therefore aren't
> > very readable in a bug report.
> >
> > Is there a better approach to this problem? or a work around?
> >
> > thanks
> > -d
> >
> > --
> > Dyon Balding <[EMAIL PROTECTED]>
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> >

-- 
Dyon Balding <[EMAIL PROTECTED]>

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] standard_error_message manipulation

2001-04-09 Thread Andy McKay

Sorry what answer would you like? :)

Cheers.
--
  Andy McKay.


- Original Message -
From: "Dyon Balding" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>
Cc: "Dyon Balding" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 9:57 PM
Subject: Re: [Zope-dev] standard_error_message manipulation


> argh! that wasn't the answer i was looking for :)
>
> -d
>
> On Mon, Apr 09, 2001 at 09:57:36PM -0700, Andy McKay wrote:
> > I run error_value through a simple python script to get the original
message
> > back again :)
> >
> > Cheers.
> > --
> >   Andy McKay.
> >
> >
> > - Original Message -
> > From: "Dyon Balding" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, April 09, 2001 9:44 PM
> > Subject: [Zope-dev] standard_error_message manipulation
> >
> >
> > > Hi,
> > >
> > > As part of a large python product I wanted to modify the normal
> > > "Zope Error" standard_error_message page.
> > >
> > > Most exceptions will be caught in the code, and therefore those
> > > that do get through and cause an error message to be displayed
> > > to the user probably indicate a bug in our code.  I would like
> > > to give the user the ability to submit the details of the exception
> > > along with their own information as a bug report.
> > >
> > > I created my own standard_error_message, and wanted it to contain
> > > a form with the values of error_value and error_tb among
> > > others.  It however appears that the values of these variables get
> > > rendered into HTML much earlier than desired and therefore aren't
> > > very readable in a bug report.
> > >
> > > Is there a better approach to this problem? or a work around?
> > >
> > > thanks
> > > -d
> > >
> > > --
> > > Dyon Balding <[EMAIL PROTECTED]>
> > >
> > > ___
> > > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > > http://lists.zope.org/mailman/listinfo/zope-dev
> > > **  No cross posts or HTML encoding!  **
> > > (Related lists -
> > >  http://lists.zope.org/mailman/listinfo/zope-announce
> > >  http://lists.zope.org/mailman/listinfo/zope )
> > >
>
> --
> Dyon Balding <[EMAIL PROTECTED]>
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Tracking memory leak

2001-04-09 Thread Andy McKay

Seems a little shoddy but ok. I'll start with my own products, assuming
stuff from DC is fine :)

Cheers.
--
  Andy McKay.


- Original Message -
From: "Chris McDonough" <[EMAIL PROTECTED]>
To: "Andy McKay" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 09, 2001 7:01 PM
Subject: Re: [Zope-dev] Tracking memory leak


> A painful, but effective way is to get a rough idea of what might be
> leaking and then go disable code in the thing that you think is leaking
> in large sections... I know this isn't very helpful, but it's true.
>
> Andy McKay wrote:
> >
> > Does anyone have advice for tracking (apparent) memory leaks other than
> > sitting watching DebugInfo?
> >
> > Cheers.
> > --
> >   Andy McKay.
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
>


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Image Archive Project (phase 2)

2001-04-09 Thread Michael R. Bernstein

Ok, I now have the following setup:

ArchiveImages (Specialist)
 defaultRack
  traversal (SkinScript)
 traversal_method (Python Script)
 Renderings (Specialist)
  defaultRack

The SkinScript in ArchiveImages/defaultRack simply points
__bobo_traverse__ to traversal_method.

traversal_method, in turn, checks to see if it is being
called with one of a short list of known methods of the
ArchiveImage ZClass, otherwise it returns an object in the
Renderings Specialist.

Which object, you ask? The objects in Renderings are
instances of RackImage (a class that subclasses Image and
DataSkin). Currently, I have hardwired behaviour that
instantiates a RackImage in Renderings when you create an
ArchiveImage. Assuming that the ArchiveImage is created with
an id of '001', then the RackImage is created with an id of
'001_original'.

So when the traversal_method is presented with a path of
'/ArchiveImage/001/original' it returns the object from
'/ArchiveImage/Renderings/001_original'. Thus the
ArchiveImage ZClass appears to have an 'original' attribute
that returns an image.

Here is the traversal_method Python Script:

 import string

 if name in ['index_html', 'editInstanceForm',
'editInstance']:
 return getattr(context, name)
 else:
 rendering = string.join([context.id, name],'_')
 return container.Renderings.getItem(rendering)


Ok, so what's next? Somehow, ArchiveImages must be made
aware of what Renderings they have.

The ArchiveImage Specialist needs a getRenderingIds() Python
Script, which in turn calls
container.Renderings.getRenderingIdsFor().

Now I'm stuck. How do I select all the Renderings that have
(for example) '001' in their id, and return just the second
portion of the id (such as 'original' or 'thumbnail')? What
do I need to put into the getRenderingIds and
getRenderingIdsFor Python Scripts?

TIA,

Michael Bernstein.

P.S. The (currently hardwired) Renderings instantiation code
will be delegated later to another Specialist,
RenderingDisplays.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] I am looking for a DragDrop target.

2001-04-09 Thread Robert Rottermann

Thanks for your tip.
This is where I am heading. Just there may be something embeded in python.

Robert
> I'm just speculating, because I've never done this, but I do remember that
> Javascript has a event handler named "onDragDrop". Perhaps you could use
> that to fill in the name of the file object.
>
> -- Loren
>



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )