[Zope-dev] stemmed and stopped: problems with stopwords and the 'and' operator

2000-08-17 Thread R. David Murray

OK, so the TextIndex of a ZCatalog says that it "stems and stops" the
words before indexing them and, one would hope, before searching
for them.

I always thought that "stem" meant "derive the stem of the word" (so
as to make the index smaller).  I just peeked at the Splitter.c
source code for the first time, and that sure ain't it.  The American
phrase would be "truncate and stop", I think.  In any case, "stem"
in the source code comments means truncate at MAX_WORD, which is
64 characters.

That's an aside.

Now, about stopping.  There is a list of "stop words" that don't
get indexed.  Fine.  I'm having quite a bit of trouble figuring
out exactly where this is happening, but let's ignore that
for now on the indexing side.  It happens, that's enough for now.

Now, what happens to stop words in an input search string?
From my single stepping the code, stopwords are still in
the query string while it is being parsed, and get looked
up in the index.

So, here is the heart of my problem:  consider the search string

  someword and someotherword

Suppose 'someword' is a stopword.  It doesn't get indexed because
it is considered too common.  Now, I would think that if this
search string is submitted, the result would be to return the
hits for 'someotherword'.  This might, however, not be other
people's opinions.  So, is the fact that TextIndex appears to
return the null set in this case a bug or a feature?

I say 'appears' because I actually get 2 (out of about 2000 with
the keyword 'car') hits in my database when I search on 'car and
the'.  I tried to single step through the logic using the debugger,
but when the call is made made to the splitter with the stopword
passed in, python core dumps.  I can do 'from SearchIndex.Splitter
import Splitter', and call Splitter, and see that stopwords are
not removed, but I can't do 'from SearchIndex.UnTextIndex import
Splitter' because it complains about not being able to import
Persistent from Persistence.  (*That* problem was reported by someone
else in another context not too long ago.)

However, it's pretty clear that this null set return is what is
happening, since when the evaluate subroutine is entered, the stop
word is in the partially parsed string, and is in fact passed to
the Splitter in the __getitem__ of the text index.  If the splitter
stopped it, the returned result set would be None, If the splitter
doesn't stop it, the text index is still going return a null set
as the result for that word, since it doesn't appear in the index
by definition.  An 'and' of any result set with None is going to
be the null set.

So it looks like the thing was designed this way:  the stop words
get "deleted" from the search string by not being in the index and
by therefore returning null sets when looked up.  This works fine for
'or' logic, but not for 'and' logic, IMO.

Contrary opinions?  Helpful hints?  If I'm right and this needs
fixed, it's going to be a bit of a bear to do, I think.

(Where those two hits are coming from is a *real* mystery, but one
I'm going to ignore for a little while yet since I can't yet get
the debugger to work for me without crashing.  I have a sneaking
suspicion it is related to my confusion about where stopwords
get removed in the indexing process, but it will probably take
a while for me to prove or disprove that notion.)

--RDM


___
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] Caching problems

2000-08-17 Thread Bob Pepin

On Wed, Aug 16, 2000 at 05:31:29PM +0100, Carlos Neves wrote:
 You directly change a nonpersistence participant object.
 As stated in
 http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html :
[...]
 but mainly... RTFM ;-)

Well, thanks, but too bad the only FM I've been able to find about Zope are
those .py files in lib/python/...

I spent a whole day looking for documentation on ZODB internals on zope.org and
zdp.zope.org, without being able to find anything... how about adding that
paper to the search engine on zope.org? Is there more documentation like that
one out there?

___
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] Acquisition ( slightly less Confusion ;-)

2000-08-17 Thread Chris Withers

Evan Simpson wrote:
   - never expose a "bare" object, or even one with an incomplete context
 
  Why? You can get at it through aq_base anyway, surely?
 
 Only from unrestricted code.  DTML and (CVS) Python Methods only let you
 access aq_parent.  This only applies to objects that are part of the
 containment hierachy, of course.  Brand new objects aren't wrapped, nor are
 simple non-persistent types like lists and dicts.

Ah, okay... so really, prettymuch all Zope objects should be wrapped
with only one or two exceptions, most of which aren't actually objects
as such but simple data types?


  Would it matter if the
  wrappers were structured differently to provide a different search
  order?

 Only to anyone who depends on the current behavior :-) 

Heh, ain't backward compatability a bitch ;-)

 Also, there is a
 very limited range of "natural" ways to construct the wrappers.  Once
 contructed, of course, we can fool with them in arbitrary ways.

So I see, does this reduce efficiency at all?

 We want to be able to find out what an object's container is, regardless of
 what we acquired it from.  In raw acquisition, there's no straightforward
 way to do this.  In simplified acquisition, aq_inner.aq_parent is the
 container.  The simplification is the rule (A o B) o (B o C) = A o (B o C).

I don't see how this simplification actually makes a difference...
In what way does it change the search order?
From what I read, I though it just reduced the number of checks you had
to do...

 All of these would search the dotted expression from right to left, so they
 would give you B's I.
  dtml-var expr="aq_context(A.B.C.D).I"
  dtml-var expr="aq_context(A.B.C).I"
  dtml-var expr="aq_context(A.B).I"

cool :-)

 All of these would search the containers of the right-most object, so the
 first two would give you A's I, and the third B's I.
  dtml-var expr="aq_containment(A.B.C.D).I"
  dtml-var expr="aq_containment(A.B.C).I"
  dtml-var expr="aq_containment(A.B).I"

weird ;-S (but I suppose someone might find it useful ;-)

The external methods were very cool. How should I got about petitioning
for 
dtml-var anobject aq_context to become valid syntax?

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] Acquisition ( slightly less Confusion ;-)

2000-08-17 Thread Shane Hathaway

Chris Withers wrote:
 How should I got about petitioning
 for
 dtml-var anobject aq_context to become valid syntax?

There's one little (okay, big) problem with this idea: aq_context
strips the security context.  In fact, it could be used to confuse the
security machinery.

Let's say I'm Joe Hacker and I have set up membership at
www.zope.org/Members/jhacker.  I create a DTML method called index_html
with this:

dtml-with Members
dtml-with hathawsh aq_context
  dtml-call expr="index_html.manage_edit('1 0WN U')"
/dtml-with
/dtml-with

Line 2 might be written as dtml-with hathawshdtml-with aq_context.

Now I may have accessed the member folder for hathawsh with the local
roles that are supposed to be in effect only in my own folder.  Zope
acquires the local roles from anything in the path
/Members/jhacker/Members/hathawsh/index_html.  Normally the local roles
would be determined by /Members/hathawsh/index_html, in which case Zope
would find no local roles for jhacker.

"aq_containment" should be fine, however.

Shane

___
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] Comparing folder instances

2000-08-17 Thread Carl Robitaille

Hi,

A quick question. How do I compare folder instances ?(or any instances
as a matter of fact).

Here is a simple code showing what I tried:

dtml-in "objectValues(['Folder'])"

 dtml-var "_.getitem('sequence-item')"
 dtml-var "images"
 dtml-var "_.getitem('sequence-item')==images"

/dtml-in

Here is now the resulting HTML


Folder instance at 85cf958
Folder instance at 85cf958
0


Folder instance at 858a168
Folder instance at 85cf958
0

Why isn't the first comparison returning true? What I want to use is
something like:


dtml-in "objectValues(['Folder'])"

 dtml-if "_.getitem('sequence-item')==images"
   EQUAL
 dtml-else
   NOT EQUAL
 /dtml-if

/dtml-in

Thanks a lot in advance for your comments.

Carl

___
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] Acquisition Wrappers Bit Again ;-)

2000-08-17 Thread Chris Withers

Carl Robitaille wrote:
  dtml-var "_.getitem('sequence-item')"
  dtml-var "images"
  dtml-var "_.getitem('sequence-item')==images"

 Folder instance at 85cf958
 Folder instance at 85cf958

Congratulations, you've just been bitten by the thing that confused me
for half a day...
You see, while they say Folder instance at 85cf958, they're actually
lying ;-)

The objects you're comparing are actually acquisition wrappers.

IMHO, == should work with acquisition to make problems like the above
not happen. I suggested this, and Jim Fulton agreed:
http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/08240A8E0D50AEE0 

Sadly, nothing seems to have been done about it :(
Maybe you should chuck it in the collector as a bug in the
ExtensionClass?

cheers,

Chris

PS: In the meantime, the following should work:

 dtml-in "objectValues(['Folder'])"
 
  dtml-if
"_.getattr(_.getitem('sequence-item'),'aq_base',_.getitem('sequence-item'))==_.getattr(images,'aq_base',images)"
EQUAL
  dtml-else
NOT EQUAL
  /dtml-if
 
 /dtml-in

___
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: Acquisition Wrappers Bit Again ;-)

2000-08-17 Thread Carl Robitaille

Hi Criss,
 
Thanks a lot for your quick response!! Since I'm a new Zope user, I
guess I'll just cut-paste the line you suggest without trying to
understand for the moment  ;-)

Carl


 Carl Robitaille wrote:
   dtml-var "_.getitem('sequence-item')"
   dtml-var "images"
   dtml-var "_.getitem('sequence-item')==images"
 
  Folder instance at 85cf958
  Folder instance at 85cf958
 
 Congratulations, you've just been bitten by the thing that confused me
 for half a day...
 You see, while they say Folder instance at 85cf958, they're actually
 lying ;-)
 
 The objects you're comparing are actually acquisition wrappers.
 
 IMHO, == should work with acquisition to make problems like the above
 not happen. I suggested this, and Jim Fulton agreed:
 http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/08240A8E0D50AEE0
 
 Sadly, nothing seems to have been done about it :(
 Maybe you should chuck it in the collector as a bug in the
 ExtensionClass?
 
 cheers,
 
 Chris
 
 PS: In the meantime, the following should work:
 
  dtml-in "objectValues(['Folder'])"
 
   dtml-if
 
"_.getattr(_.getitem('sequence-item'),'aq_base',_.getitem('sequence-item'))==_.getattr(images,'aq_base',images)"
 EQUAL
   dtml-else
 NOT EQUAL
   /dtml-if
 
  /dtml-in

___
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: Acquisition Wrappers Bit Again ;-)

2000-08-17 Thread Chris Withers

Carl Robitaille wrote:
 Hi Criss,
 
 Thanks a lot for your quick response!! Since I'm a new Zope user, I
 guess I'll just cut-paste the line you suggest without trying to
 understand for the moment  ;-)

Nih!

Welcome to the deep end ;-)

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] Cool, we like the . :-)

2000-08-17 Thread Chris Withers


Steve Alexander wrote:
 I can't think of a nice alternative to mean dtml-/foo/bar/baz; "from
 the root, traverse as follows".

dtml-.foo.bar.baz;

not nice, btu I can't think of anything better :(

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] Extending dtml entity syntax

2000-08-17 Thread Steve Alexander

Chris Withers has suggested extending the DTML Entity syntax to include
traversal information.

For example: dtml-foo/bar/baz;

I just checked the XML standard. This isn't allowed in XML entities.

  http://www.w3.org/TR/1998/REC-xml-19980210#NT-Nmtoken

  EntityRef ::= '' Name ';'

  NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar
   | Extender
  
  Name ::= (Letter | '_' | ':') (NameChar)*

However, we could consider dtml-foo.bar.baz; instead.

I can't think of a nice alternative to mean dtml-/foo/bar/baz; "from
the root, traverse as follows".

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.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] Re: Acquisition Wrappers Bit Again ;-)

2000-08-17 Thread Carl Robitaille

Hi,

Just for the record, Criss' suggestion didn't work for me. I don't
quite get why though Here's the code again, where images is a
Folder:


 dtml-in "objectValues(['Folder'])"
 
  dtml-if
"_.getattr(_.getitem('sequence-item'),'aq_base',_.getitem('sequence-item'))==_.getattr(images,'aq_base',images)"
EQUAL
  dtml-else
NOT EQUAL
  /dtml-if
 
 /dtml-in

The error I get from Zope is:

File /home/zope/Zope2/lib/python/DocumentTemplate/DT_Util.py, line 337,
in eval
  (Object:
_.getattr(_.getitem('sequence-item'),'aq_base',_.getitem('sequence-item'))==_.getattr(images,'aq_base',images))
  (Info: images)
File string, line 0, in ?
File /home/zope/Zope2/lib/python/DocumentTemplate/DT_Util.py, line 140,
in careful_getattr
AttributeError: aq_base

It's looks like aq_base is not available. I read Shane's Acquisition
Understander How-To. I created the ExternalMethod that used aq_base and
it works like a charm. I tried a lot of things even if I didn't have a
good undersanding of the problem. The only time I got a valid code (Zope
not complaining when hitting the Change button) was with that line:

  dtml-if
"_.getattr(_.getitem('sequence-item'),'images.aq_base',_.getitem('sequence-item'))==_.getattr(images,'images.aq_base',images)"

You probably know why it doesn't give the right result, but I don't
have a clue. It's still not returning true when sequence-item is
matching the images Folder. Is there anything I can read to understand
what I'm dealing with? Or maybe somebody knows what I'm doing wrong...
again


Carl


 Carl Robitaille wrote:
  Hi Criss,
 
  Thanks a lot for your quick response!! Since I'm a new Zope user, I
  guess I'll just cut-paste the line you suggest without trying to
  understand for the moment  ;-)
 
 Nih!
 
 Welcome to the deep end ;-)
 
 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] Aaargh, no safe seperators :S

2000-08-17 Thread Phil Harris

-, that;s a hyphen to you
- Original Message - 
From: "Chris Withers" [EMAIL PROTECTED]
To: "Shane Hathaway" [EMAIL PROTECTED]
Cc: "Jonothan Farr" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 9:57 PM
Subject: [Zope-dev] Aaargh, no safe seperators :S


 Shane Hathaway wrote:
  That would probably work, but isn't kind of ugly?  Now we'd be forcing
  people to realize that colons can be path separators.  Only Mac users
  know this. :-)
 
 Well, 
 
   / and \ are bad XML
 
   ; is bad XML, and _really_ ugly
 
   . confuses when there's .'s in ids
 
 Any other suggestions :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 )


___
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] Aaargh, no safe seperators :S

2000-08-17 Thread Chris Withers

Shane Hathaway wrote:
 That would probably work, but isn't kind of ugly?  Now we'd be forcing
 people to realize that colons can be path separators.  Only Mac users
 know this. :-)

Well, 

  / and \ are bad XML

  ; is bad XML, and _really_ ugly

  . confuses when there's .'s in ids

Any other suggestions :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 )




[Zope-dev] patch for dtml-foo:bar:baz;

2000-08-17 Thread Steve Alexander

This patch changes lib/python/DocumentTemplate/DT_HTML.py so that you
can use paths for traversal in DTML entity syntax. The delimiter is ':',
as it is valid as part of an XML entity, but not valid as part of a Zope
object id.

You can use dtml-:foo:bar; to ensure that traversal occurs from the
root object.

This patch is against Zope 2.2.1b1. It relies on the
restrictedTraverse() api.

A 2.1.x version would be possible, but would be rather messy.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

*** DT_HTML.py.old
--- DT_HTML.py
***
*** 98,104 
 end_match=regex.compile('[\0- ]*\(/\|end\)',
 regex.casefold).match,
 start_search=regex.compile('[]').search,
!ent_name=regex.compile('[-a-zA-Z0-9_.]+').match,
 find=find,
 strip=strip,
 replace=replace,
--- 98,104 
 end_match=regex.compile('[\0- ]*\(/\|end\)',
 regex.casefold).match,
 start_search=regex.compile('[]').search,
!ent_name=regex.compile('[-a-zA-Z0-9_.:]+').match,
 find=find,
 strip=strip,
 replace=replace,
***
*** 156,162 
  d[1]=d['end']=''
  d[2]=d['name']='var'
  d[0]=text[s:e+1]
! d[3]=d['args']=args+' html_quote'
  return s
  else:
  nn=find(args,'-')
--- 156,165 
  d[1]=d['end']=''
  d[2]=d['name']='var'
  d[0]=text[s:e+1]
! d[3]=d['args']=':' in args \
! and '"_.render(restrictedTraverse(\''+ \
! replace(args,':','/')+'\'))" html_quote' \
! or args+' html_quote'
  return s
  else:
  nn=find(args,'-')
***
*** 164,171 
  d[1]=d['end']=''
  d[2]=d['name']='var'
  d[0]=text[s:e+1]
! args=(args[nn+1:]+' '+
!   replace(args[:nn],'.',' '))
  d[3]=d['args']=args
  return s
  
--- 167,178 
  d[1]=d['end']=''
  d[2]=d['name']='var'
  d[0]=text[s:e+1]
! path=args[nn+1:]
! args=(':' in path 
! and  '"_.render(restrictedTraverse(\''+
! replace(path,':','/')+'\'))" ' 
! or path+' ') \
! +replace(args[:nn],'.',' ')
  d[3]=d['args']=args
  return s
  



Re: [Zope-dev] Aaargh, no safe seperators :S

2000-08-17 Thread Chris Withers

Phil Harris wrote:
 
 -, that;s a hyphen to you

and that can appear in ids ;-)

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] Aaargh, no safe seperators :S

2000-08-17 Thread Phil Harris

How about 

as in

dtml-pathtofileobjectwotsit;

nah, looks really ugl




- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Phil Harris" [EMAIL PROTECTED]
Cc: "Shane Hathaway" [EMAIL PROTECTED]; "Jonothan Farr" [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 10:27 PM
Subject: Re: [Zope-dev] Aaargh, no safe seperators :S


 Phil Harris wrote:
 
  -, that;s a hyphen to you

 and that can appear in ids ;-)

 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] Still no safe seperators :P

2000-08-17 Thread Chris Withers

Phil Harris wrote:
 
 How about 
 
 as in
 
 dtml-pathtofileobjectwotsit;
 
 nah, looks really ugl

And I'm damn sure that's bad XML ;-)

Looks like the colon it is then, there's even a patch now ;-)

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] Re: Acquisition ( slightly less Confusion ;-)

2000-08-17 Thread Evan Simpson

From: Chris Withers [EMAIL PROTECTED]
 Ah, okay... so really, prettymuch all Zope objects should be wrapped
 with only one or two exceptions, most of which aren't actually objects
 as such but simple data types?

Yes.

  Also, there is a
  very limited range of "natural" ways to construct the wrappers.  Once
  contructed, of course, we can fool with them in arbitrary ways.

 So I see, does this reduce efficiency at all?

Sure, but the question is, does it reduce efficiency *unacceptably*, and I
can't answer that.

  container.  The simplification is the rule (A o B) o (B o C) = A o (B o
C).

 I don't see how this simplification actually makes a difference...

In the next step, if we ask for a D and it's found in B, we get:

(A o (B o C)).D = (B o C).D o (A o (B o C)) = ((D o B) o (B o C)) o (A o
(B o C)) = (D o (B o C)) o (A o (B o C))

instead of

((A o B) o (B o C)).D = (A o B).D o ((A o B) o (B o C)) = ((D o B) o (A o
B)) o ((A o B) o (B o C))

The search order with simplification is D, B, C, A (containment first),
while without it's D, B, A, C (just plain weird).

Cheers,

Evan @ digicool  4-am


___
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] Data.fs

2000-08-17 Thread R. David Murray

On Thu, 17 Aug 2000, Andre Schubert wrote:
 My Questions are: is there a way to delete the last transaction from

One answer: use tranalyzer to find the offset of the start of the
last transaction and truncate the file there.

 Data.fs, and can i backup the Data.fs when Zope is running. Is the

Yes.

 backup of Data.fs inconsitent when i make the backup at the same time a
 user writes to it?

No.  If the last transaction in Data.fs s incomplete, Zope will ignore it on
startup.

--RDM


___
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] stemmed and stopped: problems with stopwords andthe 'and' operator

2000-08-17 Thread R. David Murray

On Thu, 17 Aug 2000, Martijn Pieters wrote:
 No clues as to where you'll find the stopword code, but the Persistence
 thingy is caused by the magic that ZODB performs: it initializes the
 correct Persistence module when it itself is imported. This way Jim
 managed to have ZODB3 and BoboPOS2 exist in the same Zope distribution.
 
 Do an import ZODB before you do your Splitter import, and all will be
 dandy.

Thanks, worked like a charm.

I think I've found the stopword code.  To cement my understanding
I'm going to write this up.  Maybe somebody will find it useful grin.

UnTextIndex accesses the splitter through the Splitter method of the
Lexicon associated with the index.  That Lexicon instance is created
when the Vocabulary or Catalog are created.  (Comments in the code
indicate that in the future each TextIndex could have its own Lexicon,
which makes sense to me.)  A Lexicon instance can be passed a list
of stop words (and/or synonyms) when it is initialized.  Vocabulary
does this for Lexicon (but not GlobbingLexicon, which internal
comments indicates does not use stopwords).  The Lexicon instance
stores this list in a property, and passes it to the real Splitter
when its Splitter method is called.

So the fix that I submitted earlier today to the collector for the 'and'
involving stopwords should work for 'listed' stopwords as well as
the punctuation and numbers that I was able to test it on.  (In my
comments in the patch I said I wasn't sure).  I still can't test it
because I'm using a Globbing lexicon wry grin.

In perusing the code I'm also feeling more confident that the
change I made to __getitem__ in that fix is in fact semantically
correct.  Or at least consistent with the rest of the __getitem__ code.

GlobbingLexicon not using stopwords also explains the few hits
on 'the and car' that I got that I was confused by.  Those entries
really must have 'the' as an indexed term, unlike the rest.

Oh, by the way, the comments in TextIndex seem to agree with me
as to the conventional meaning of the word 'stemmed' grin.

--RDM


___
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] Still no safe seperators :P

2000-08-17 Thread Evan Simpson

From: "Chris Withers" [EMAIL PROTECTED]
 Looks like the colon it is then, there's even a patch now ;-)

There a patch sitting around waiting for DTML syntaxgeddon which allows
slash-separated paths in object names everywhere, not just in entity syntax.
That could easily be extended to also allow colons as separators.

Cheers,

Evan @ 4-am  digicool


___
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] upgrade 2.2.0 to 2.2.1b1

2000-08-17 Thread Chris McDonough

The couldn't load state errors are probably from a product not getting
initialized properly.  If you set up your STUPID_LOG_FILE environment
variable and point it at a file before starting Zope (if you haven't
already), you may be able to see a failed product init before the state
errors, which would give you a clue.  That said, from your description,
it's probably kmnetnews that's not getting inited properly.  I haven't
seen  Kevin Dangoor around lately, I wonder if he's still maintaining
it.

"Bak @ kedai" wrote:
 
 hello all
 
 has anybody encountered problems when upgrading from 2.2.0 to 2.2.1b1?  i
 have problems with some products (kmnetnews), and some of my ZClasses.  are
 there any known issues?  things i should have considered?
 
 there are also tracebacks "Couldn't load state" when starting zope in debug
 mode..
 
 platform
 RH6.2, straight ZServer
 products - KMnetnews, a few ZClasses,
 
 thanks
 
 --traceback when i tried accessing kmnetnews--
 
 Zope Error
 
 Zope has encountered an error while publishing this resource.
 
 TypeError
 
 Sorry, a Zope error occurred.
 
 Traceback (innermost last):
   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py,
 line 222, in publish_module
   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py,
 line 187, in publish
   File /home/kdie/Zope-2.2.1b1-src/lib/python/Zope/__init__.py, line
 221, in zpublisher_exception_hook
 (Object: Traversable)
   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py,
 line 171, in publish
   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/mapply.py,
 line 160, in mapply
 (Object: index_html)
   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZPublisher/Publish.py,
 line 112, in call_object
 (Object: index_html)
   File /home/kdie/Zope-2.2.1b1-src/lib/python/OFS/DTMLDocument.py,
 line 171, in __call__
 (Object: index_html)
   File
 /home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_String.py, line
 502, in __call__
 (Object: index_html)
   File
 /home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_With.py, line 146,
 in render
 (Object: Data)
   File
 /home/kdie/Zope-2.2.1b1-src/lib/python/DocumentTemplate/DT_Util.py, line 337,
 in eval
 (Object: index_html(_.None, _, category='top'))
 (Info: _)
   File string, line 0, in ?
 TypeError: call of non-function (type None)
 
 end tracebacks 
 
 --tracebacks starting zope--
 --
 2000-08-17T03:53:37 ERROR(200) ZODB Couldn't load state for
 '\000\000\000\000\000\000\000Z'
 Traceback (innermost last):
   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 447,
 in setstate
   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 213,
 in _persistent_load
 (Info: 8÷)
   File /home/kdie/Zope-2.2.1b1-src/lib/python/ZODB/Connection.py, line 154,
 in __getitem__
 ---data snipped---
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Chris McDonough
Digital Creations
Publishers of Zope - http://www.zope.org

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




Re: [Zope] ZCatalog key error

2000-08-17 Thread Chris McDonough

Yeah, it's running 2.2.1b1 and it's still hosed.  :-(  When Ethan gets
back from LinuxWorld, I'm going to try to have him update to the latest
CVS and see if we can pin the problem down.

I added logging code to the catalog that was *supposed* to make it
easier to track down why these keyerrors were happening.  However, I
muffed it and the current Zope 2.2.1b1 release logs errors on all
fieldindex uncatalog_object calls (no matter if there's a problem or
not).  That particular problem is fixed in CVS.

We need to get a chance to examine the error output from index-unindex
functions to see exactly what's going on with the catalog.  I
desperately need to fix this problem for reasons unrelated to zope.org. 
If anyone is running a current CVS checkout of the Zope 2.2 branch, and
they're having KeyErrors, if you can send me relevant sections of your
stupid_log_file, I'd be grateful.  Maybe I can establish a pattern.  But
please don't send me log files with hundreds of unindex_object calls ala
Zope 2.2.1b1, it needs to be the latest CVS checkout on the 2.2 branch.

"Bak @ kedai" wrote:
 
 is Zope.org running 2.2.1b1 or CVS?  cause i think key error still occurs.
 check out 'What's New' at Zope.org, and you'll get the error.
 
 i might be wrong though
 thanks
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Chris McDonough
Digital Creations
Publishers of Zope - http://www.zope.org

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




[Zope] ProxyPass trouble II

2000-08-17 Thread Stephan Goeldi

I forgot to mention:

The ProxyPass works ok. After some work in the management folder, Apache 
sends me the error message:

"The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Could not connect to remote machine: Connection refused"

When I reboot the server, everything goes ok again.

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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




[Zope] ProxyPass trouble

2000-08-17 Thread Stephan Goeldi

I use Zope with Apache 1.3.12 via ProxyPass. This is a nice workaround, 
because I don't have to struggle with the Rewrite stuff.

My httpd.conf settings are the following:

VirtualHost 1.2.3.4
ServerName www.leimental.net
ProxyPass /  http://1.2.3.4:8080/leimental.net/
ProxyPassReverse  /  http://1.2.3.4:8080/leimental.net/
ProxyPass /cgi-bin/  http://1.2.3.4:80/cgi-bin/
ProxyPassReverse  /cgi-bin/  http://1.2.3.4:80/cgi-bin/
ProxyPass /manage/   http://1.2.3.4:8080/manage/
ProxyPassReverse  /manage/   http://1.2.3.4:8080/manage/
ProxyPass /misc_ http://1.2.3.4:8080/misc_
ProxyPass /p_http://1.2.3.4:8080/p_
/VirtualHost

TIA
-goe-


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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




[Zope] Old Zope packages

2000-08-17 Thread Jarkko Veijalainen


Where can i download older versions of Zope. I need Zope 2.1.6. on solaris.
I previously did my project on RH6.2 / Zope 2.1.6 and i have this week to
get my project work on Zope 2.2.0 with solaris. It doesn't work (it doesn't
pass authentication, when i try post data to another dtml document) and i'm
in hurry to test my project on Solaris, so please tell me quickly where can
i download older Zopes.

look also :   33. Is this a bug? Posting data to another DTML document
(Jarkko Veijalainen) on Zope digest, Vol 1 #934 

jarkkov

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




[Zope] unable to login with newly created user

2000-08-17 Thread Corey


Hello all,

  I'm new to Zope - extreme apologies if this question has already
  been answered, but I'm simply at wits end here...

  Linux 2.2.14 
  Python 1.5.2 
  Zope 2.2.0 from source wo_pcgi 
  Zserver

  I simply cannot for the life of me log in as non-superuser.
  
  I've installed and unininstalled and re-installed... and read,
  and re-read the docs but to no avail - I even went so far
  as to try from scratch on a wholy different computer all
  together and was met with the exact same issue.

  After spending plenty of time in the archives for the list
  and at the zope site's howto's I still have been unsuccessfull
  in gleaning any help. I must have missed something very simple
  along the way somewhere.

Here, in step by step order, is what I've been doing:

log in as superuser
access the manage page
traverse into the /acl_users folder
add a new user
correctly set and verify the password
attach Manager and Owner roles to user
submit the Change button
restart Zope
clear netscape cache
close netscape
restart netscape
point browser to zope page
attempt to login with new user into Manage page...
*allways* fail *everytime* with an 'Authorizatin failed' msg

ack!

  What is my feeble little mind not catching onto here? I've
  ran z2.py with the -D flag and logging, and went through
  the same steps but nothing at all in these logs provides
  me with anything remotely usefull...

  I've ran Zope as both root and nobody, with no change.
  This is very frustrating, I've been at it for most of the 
  night now.  I sure could use a clue...


Thanks,

Corey


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




Re: [Zope] unable to login with newly created user

2000-08-17 Thread Martijn Pieters

On Thu, Aug 17, 2000 at 01:58:04AM -0700, Corey wrote:
 Hello all,
 
   I'm new to Zope - extreme apologies if this question has already
   been answered, but I'm simply at wits end here...
 
   Linux 2.2.14 
   Python 1.5.2 
   Zope 2.2.0 from source wo_pcgi 
   Zserver
 
   I simply cannot for the life of me log in as non-superuser.
   
   I've installed and unininstalled and re-installed... and read,
   and re-read the docs but to no avail - I even went so far
   as to try from scratch on a wholy different computer all
   together and was met with the exact same issue.
 
   After spending plenty of time in the archives for the list
   and at the zope site's howto's I still have been unsuccessfull
   in gleaning any help. I must have missed something very simple
   along the way somewhere.

Make sure that the domains field is empty. It is a space seperated list of
domains the user is admitted from, in either ip-number or ip-address
format. '*' as a wildcard for nameparts is allowed. Example:
'*.digicool.com 194.153.144.*'.

Also, you don't need to set the Owner role. It is a special, magic role
used as a Local Role on objects a user created.

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

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




[Zope] Pb with MIME Type x-vCard

2000-08-17 Thread Didier Georgieff

Hello,

I'm doing a method for getting vCards from a directory.

It works fine, until i want to put some dtml-var with the x-vCard 
MIME type

1 - If i only put hard coded text it works fine. I get the usual vCard 
page on Netscape.

Content-type:text/x-vCard
Content-Transfer-Encoding:8bit

BEGIN:VCARD
VERSION:2.1
N:name
EMAIL;INTERNET:email
TEL;WORK:tel
END:VCARD

2 - If i put some dtml-var and render it ascii it works fine. I get a 
html page with the rendered variables.

Content-type:text/plain
Content-Transfer-Encoding:8bit

BEGIN:VCARD
VERSION:2.1
N:dtml-var name
EMAIL;INTERNET:dtml-var email
TEL;WORK:dtml-var tel
END:VCARD

3 - It fails when i do the x-vCard type AND dtml-var.

Content-type:text/x-vCard
Content-Transfer-Encoding:8bit

BEGIN:VCARD
VERSION:2.1
N:dtml-var name
EMAIL;INTERNET:dtml-var email
TEL;WORK:dtml-var tel
END:VCARD

I'm on 2.1.6 and Netscape 4.51

ANy idea on this strange behaviour ?
--
Didier Georgieff
DDAF du Bas-Rhin - Cellule SIG 
2, rue des Mineurs 67070 Strasbourg Cedex
tél : 03.88.25.20.33 - fax : 03.88.25.20.01
email : [EMAIL PROTECTED]
GéoWeb http://10.67.90.3 (Intranet Agriculture)
GéoWeb http://sertit10.u-strasbg.fr (Internet)

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




Re: [Zope] Old Zope packages

2000-08-17 Thread Corey

And upon Thursday of August 17, the illustrious Jarkko Veijalainen spake thusly...
 
 Where can i download older versions of Zope. 

snip

  http://www.zope.org/Products/Zope/



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




Re: [Zope] unable to login with newly created user

2000-08-17 Thread Corey

And upon Thursday of August 17, the illustrious Martijn Pieters spake thusly...
 On Thu, Aug 17, 2000 at 01:58:04AM -0700, Corey wrote:
  Hello all,
  
I'm new to Zope - extreme apologies if this question has already
been answered, but I'm simply at wits end here...
snip
I simply cannot for the life of me log in as non-superuser.

snip
 
 Make sure that the domains field is empty. It is a space seperated list of
 domains the user is admitted from, in either ip-number or ip-address
 format. '*' as a wildcard for nameparts is allowed. Example:
 '*.digicool.com 194.153.144.*'.
 

  OK, yeah - I did leave that field empty.. forgot to mention that
  in my post.

 Also, you don't need to set the Owner role. It is a special, magic role
 used as a Local Role on objects a user created.
 

  Will having the Owner role actually keep me from logging in as that
  user?  I can't seem to create a user *without* the Owner role
  anyhow... jeeze.

  Any other suggestions?  I appreciate the help - in the mean time,
  I'm gong to try installing version 2.1.6.

Beers,

Corey



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




Re: [Zope] Invalid Date-Time String

2000-08-17 Thread Oliver Frommel

  Unfortunately I am getting an "Invalid Date-Time String" error when
  calling the manage_editProperties. I tried some possible solutions from the
  mailing lists but failed so far, e.g. using ZopeTime or ZopeTime().DateTime()
  Any help?
 

...
 
 
 dtml-let x="ZopeTime().strftime('InsertYourFormat')"
 dtml-call REQUEST.set('date1', x)
 dtml-call "propertysheets.prop.manage_editProperties(REQUEST)"
 dtml-let
 
 I hope that helps.



unfortunately it didn't. now I am stuck :(

--Oliver
 


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




[Zope] jcNTUserFolder questions

2000-08-17 Thread Jean Jordaan

Hi all

I'm trying out jcNTUserFolder-0.0.7.zip now. It's looking great,
but it looks like I've run across some gotchas. 

1. I copied the entire installation from one computer to another::

 robocopy \\corpcomms\ZopeCorpComms \\jean\programs\ZopeCorpComms /MIR

   (which under W2K does an exact mirror of the whole thing). Now 
   starting it (using 'start.bat') and attempting to authenticate gets me:: 

AttributeError

Sorry, a Zope error occurred.

Traceback (innermost last):
File C:\PROGRA~1\ZOPECO~1\lib\python\ZPublisher\Publish.py, line
214, in publish_module
File C:\PROGRA~1\ZOPECO~1\lib\python\ZPublisher\Publish.py, line
179, in publish
File C:\PROGRA~1\ZOPECO~1\lib\python\Zope\__init__.py, line 202, in
zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
File C:\PROGRA~1\ZOPECO~1\lib\python\ZPublisher\Publish.py, line
151, in publish
File C:\PROGRA~1\ZOPECO~1\lib\python\ZPublisher\BaseRequest.py, line
428, in traverse
File C:\PROGRA~1\ZOPECO~1\lib\python\ZPublisher\BaseRequest.py, line
504, in old_validation
(Object: broken)
AttributeError: __getitem__

   Would this have anything to do with jcNTUserFolder? It worked fine
before.

2. I don't understand how sub-NTUserFolders work. The following text (that
you
   get when adding an NTUserFolder in a subfolder) doesn't enlighten me.
What
   does "undesirable (although possible)" mean?

Default behavior is to acquire user settings from higher user
folders
note: this setting helps with nesting NT User folders.
It interferes with local roles. If you plan to use local roles, you
should uncheck this box.
It is then undesirable (although possible) to have nested NT User
Folders.

   What puzzles me is this: in the root I have a user 'zopeman' with Manager
   rights. When I create an NTUserFolder in '/docs', zopeman doesn't have
   rights to access it. Neither does the superuser. ??

-- 
Jean Jordaan   --technical writer--
Mosaic Sofware --Zope 2.1.6 on W2K

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




[Zope] OQL for Zope

2000-08-17 Thread Francois-Regis CHALAOUX

Will Zope.org implement OQL?

FR
  
  
  
  
  
  
  
  
 

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




Re: [Zope] Old Zope packages

2000-08-17 Thread Chris Withers

Martijn Pieters wrote:
 See http://www.zope.org/Products/Zope
 
 I agree there should be a link from the Products page.

I'm just wondering what '2.0.0-donotuseme' was? ;-)

cheers,

Chris

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




[Zope] open a database connection

2000-08-17 Thread Tom Deprez

Hi,

How can I open a database connection from dtml?

Thanks in advance,

Tom.

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




[Zope] Re: Pb with MIME Type x-vCard

2000-08-17 Thread Didier Georgieff

Le 17 Aug 00, à 11:31, [EMAIL PROTECTED] a écrit :

 I'm doing a method for getting vCards from a directory.
 It works fine, until i want to put some dtml-var with the x-vCard 
 MIME type

I respond to my own post.
It seems that vCard doesn't like a line WITH propertyname AND 
WITHOUT propertyvalue.

So some dtml-if does the trick.
Pay attention, the /dtml-if needs to be on a separate line for line 
break reasons.


Content-type:text/x-vCard
Content-Transfer-Encoding:8bit

BEGIN:VCARD
VERSION:2.1
N:dtml-var name
EMAIL;INTERNET:dtml-var email
dtml-if "tel''"TEL;WORK:dtml-var tel
/dtml-if
END:VCARD


--
Didier Georgieff
DDAF du Bas-Rhin - Cellule SIG 
2, rue des Mineurs 67070 Strasbourg Cedex
tél : 03.88.25.20.33 - fax : 03.88.25.20.01
email : [EMAIL PROTECTED]
GéoWeb http://10.67.90.3 (Intranet Agriculture)
GéoWeb http://sertit10.u-strasbg.fr (Internet)

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




Re: [Zope] Announce: Squishdot 0.5.0 now available!

2000-08-17 Thread Chris Withers

albert boulanger wrote:

 If I have an existing squishdot instance and want to gain the plain
 text feature, is there a recipie for doing so? Is it simply replacing
 the squisdot product or do I need to modify the existing one after
 adding the new product version?

whoops, sorry, forgot to include this link:

http://www.squishdot.org/Documentation/upgrades.html

cheers,

Chris

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




Re: [Zope] open a database connection

2000-08-17 Thread Tom Deprez

Hi,

sorry, found it by myself somewhere in the zope directory:


for the people who are interesed:

manage_open_connection
manage_close_connection

Regards, Tom.


At 14:46 17/08/2000 +0200, Tom Deprez wrote:
Hi,

How can I open a database connection from dtml?

Thanks in advance,

Tom.

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



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




[Zope] Re: concerning Xron with DA

2000-08-17 Thread Loren Stafford

From: "Nicholas Lo" [EMAIL PROTECTED]

 I just wonder if Xron works with ZSQL Methods.
 I know that ZSQL Methods only works with the request thread.
 Thanks.

I can think of no reason Xron would not work with ZSQL Methods; but I
haven't tried it, because I have no SQL in my applications. Xron's
dispatcher thread does not directly run scheduled methods; it uses Client.py
to fabricate a request. So the scheduled method runs in a request thread,
just as an ordinary client request. Scheduled methods are a subclass of DTML
Method, so the scheduled method would have to call your ZSQL Method.

There is currently no way to pass parameters to the request. If the ZSQL
Method requires parameters, the scheduled method must supply them from its
context.

Would you like to be the first to try it out and report back to the mail
list?

Or has someone else already tried this?

-- Loren




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




Re: [Zope] Python function within a ZClass...

2000-08-17 Thread Marcin Kasperski

Vincent wrote:
 
 Is it possible to access Python function within a ZClass ?
 
 If yes, how should I do that ?
 

Two methods

1) create External Method (python code in separate file placed in
Extensions directory + information which file should be called in Zope
management interface)

2) create Python Method (you must install non-standard product providing
Python Methods) - then you edit Python code just via Zope management
interface (like DTML Documents)



-- Serwis nie tylko mieszkaniowy: http://www.mk.w.pl 
|
| You have the right to accept your responsibilites instead of having   
| them assigned to you. (Ken Beck's Third Developer Right)  
|

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




Re: [Zope] ProxyPass trouble II

2000-08-17 Thread Stephen Harrison

Stephan Goeldi wrote:
 
 I forgot to mention:
 
 The ProxyPass works ok. After some work in the management folder, Apache
 sends me the error message:

If the proxy rules are all working fine to start with, then there
shouldn't be any reason for them to suddenly stop working.

 "The proxy server received an invalid response from an upstream server.
 The proxy server could not handle the request GET /.
 Reason: Could not connect to remote machine: Connection refused"

This is saying that it is trying to proxy your request, but the backend
server is not responding (ie. the zope server is not responding).

 When I reboot the server, everything goes ok again.

This further strengthens the case that this problem is not related to
the ProxyPass at all, rather to do with what you are doing to your zope
server.

It works.
You do some things.
It stops working.
You reset the server.
It works.

Throughout all of that, ProxyPass is proxying your requests, so that is
not your problem.

Cheers,
Stephen

-- 
Stephen Harrison[EMAIL PROTECTED]
New Information Paradigms   www.nipltd.com

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




[Zope] Zope is very slow!

2000-08-17 Thread Christiano Anderson

Hi,

This is my first message to the list... 

I'm currently running Zope 2.1.6 + Apache 1.3.12 (with proxycache). The
system is a Solaris 5.6 on a E450 with 2GB Ram and 2 X 450mhz... 

The Zope is running with Apache, using the ProxyCache and SiteAccess to
convert all requests from port 8080 to 80. 

My problem is: The system is *too slowly*! 

Does anyone know how to optimize the Zope to run quicker? Is there
anything wrong with this configuration??

Thanks a lot,

Christiano Anderson



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




[Zope] jcNTUserFolder troubles ..

2000-08-17 Thread Jean Jordaan

Hi all 

Owww, now I understand nothing anymore. 

There's an NTUserFolder in '/' with user zopeman (on the local machine)
with Manager and Debugger roles (Debugger doesn't have any permissions,
it's just used to trigger the output of debugging information).
'standard_html_header' contains:

dtml-if AUTHENTICATED_USER
dtml-var "AUTHENTICATED_USER.getUserName()" 
dtml-var "AUTHENTICATED_USER.getRoles()" 
!--#var title_or_id--

Now how on earth can this output::

corpcomms\zopeman 

i.e. with *no* roles. Furthermore, when I browse to '/docs/manage' I get
the left frame ('manage_menu') OK, but the right frame contains the
viewed 'index_html' instead of the management view ('manage_workspace'). 

And, having gone back and forth with this for a bit, Python is now
permanently taking up 99% of CPU. When I looked, it was using 21Mb 
of memory. Zope has frozen. I can't even browse to the control panel 
to shut it down. ?!?!?!

I walked over to the relevant machine to shutdown and restart the Zope
service, and that took me 10 minutes because it had become completely
unresponsive. 

Any advice, pleeeze? Could this be due to jcNTUserFolder? Has anyone
used it under stress? 

-- 
Jean Jordaan   --technical writer--
Mosaic Sofware --Zope 2.1.6 on WinNT and W2K

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




Re: [Zope] Python function within a ZClass...

2000-08-17 Thread Toby Dickenson

On Thu, 17 Aug 2000 15:42:17 +0200, Marcin Kasperski
[EMAIL PROTECTED] wrote:

Vincent wrote:
 
 Is it possible to access Python function within a ZClass ?
 
 If yes, how should I do that ?
 

Two methods

1) create External Method (python code in separate file placed in
Extensions directory + information which file should be called in Zope
management interface)

2) create Python Method (you must install non-standard product providing
Python Methods) - then you edit Python code just via Zope management
interface (like DTML Documents)


3) create a python class that does what provides the methods, and use
that as a base class for your ZClass
 pro: easy to add more methods
 con: need to restart server after changes
  need to do this before you create the ZClass


Toby Dickenson
[EMAIL PROTECTED]

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




[Zope] How to assing a string value to a variable in DTML?

2000-08-17 Thread iap_y2fun.com

Forgive me for this stupid question:
How to assing a string value to a variable in DTML?
for example:

dtml-let a='a'
b='b'
dtml-var "a+b"
/dtml-let

it causes error, not what I expected:
given a="", b="", and eval a+b to ""

Thanks

iap



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




Re: [Zope] How to assing a string value to a variable in DTML?

2000-08-17 Thread Daniel Rusch

dtml-let a="'a'"
b="'b'"
dtml-var "a+b"
/dtml-let

Notice the quotes. See the How to on Let tags:
http://www.zope.org/Members/michel/HowTos/LetTagHow-To

DR


"iap_y2fun.com" wrote:

 Forgive me for this stupid question:
 How to assing a string value to a variable in DTML?
 for example:

 dtml-let a='a'
 b='b'
 dtml-var "a+b"
 /dtml-let

 it causes error, not what I expected:
 given a="", b="", and eval a+b to ""

 Thanks

 iap

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


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




Re: [Zope] Zope is very slow!

2000-08-17 Thread J. Atwood

Hi Christiano (nice first message... :)  )

First of all, lets define slow. What does slow mean? Have you tested it with
AB (apachebench)? You sure it is not your connection? Watched it in TOP? My
guess is that with 2.1.6 (straight) on that system you should be able to get
about 200 requests per second which is not SLOW at all.

Check your Apache, Proxycache and SiteAccess my guess it is there.

Turn off debugging.

Upgrade to 2.2.1 (60% faster on dual processors).

Take a look at 

http://www.zope.org/Members/BwanaZulia/benchmarks.html to get an idea of
what you system should be doing.

Just some suggestions.

J

 From: Christiano Anderson [EMAIL PROTECTED]
 Date: Thu, 17 Aug 2000 11:12:00 -0300 (BRT)
 To: [EMAIL PROTECTED]
 Subject: [Zope] Zope is very slow!
 
 Hi,
 
 This is my first message to the list...
 
 I'm currently running Zope 2.1.6 + Apache 1.3.12 (with proxycache). The
 system is a Solaris 5.6 on a E450 with 2GB Ram and 2 X 450mhz...
 
 The Zope is running with Apache, using the ProxyCache and SiteAccess to
 convert all requests from port 8080 to 80.
 
 My problem is: The system is *too slowly*!
 
 Does anyone know how to optimize the Zope to run quicker? Is there
 anything wrong with this configuration??
 
 Thanks a lot,
 
 Christiano Anderson
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


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




RE: [Zope] How to use RESPONSE.redirect ?

2000-08-17 Thread Stuart Foster

Thanks for the input. I ended up putting the info I needed into the url

dtml-var "someurl?a=blah"

I put it in a method that is usuble from a couple of forms and it seems to
work.

Thanks again.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kapil
Thangavelu
Sent: Tuesday, August 15, 2000 3:44 PM
To: Stuart Foster
Cc: Zope List
Subject: Re: [Zope] How to use RESPONSE.redirect ?


Stuart Foster Wrote:
 I want to use redirect to call another form passing the current form, how
 can I do that.

 dtml-call RESPONSE.redirect('otherform'+?)


Hi Stuart,

i ran into the same problem a little while ago. i was trying to pass the
user around to the proper displayprocess page(with inputs inplace)
after a logic page that determined where they should go based on their
inputs. IMO, The crux of the problem is that Zope as a web development
platform should include the urlparse lib from the python core more over
this problem and others like it should be remedied i believe by a
standard method of extending the modules in the _ namespace with thread
safe modules that a developer deems nesc. OK enough soap box... i ended
up reimplementing the nesc. functionality in a python method and created
another method to implement complete form insertion in much the same the
style that of some ACS(arsdigita) utiltiy methods do. here they are,
usage examples are included in the code.

of course this solution requires evan simpson's python methods product
be installed on your zope.

Cheers Kapil

method 1 note="depends on method2"
name: url_encode_form_vars
args: namespace
code
# depends on url_encode_vars

try:
vars=namespace['REQUEST'].form
method =  namespace.getitem('url_encode_vars', 0)
return method(vars)
except:
pass



#example call to above
#dtml-call "RESPONSE.redirect(URL1+'?'+url_encode_form_vars(_))"
/code

/method 1


method 2

name: url_encode_vars
args:

code

'''
Code straight from urllib minor
changes to get around assignment to sub_scripts,
access to string module, and namepace issues

expects a dictionary of key value pairs to be encoded

example call

dtml-call
"RESPONSE.redirect(URL1+'?'+url_encode_vars({vars={'squishy':1,
'bad_input':'user=root'}) )"
'''

global always_safe, quote, quote_plus
always_safe = _.string.letters + _.string.digits + '_,.-'

def quote(s, safe = '/'):
global always_safe
safe = always_safe + safe
res = []
for c in s:
if c not in safe:
res.append('%%%02x'%ord(c))
else:
res.append(c)
return _.string.joinfields(res, '')


def quote_plus(s, safe='/'):
global quote
if ' ' in s:
res = []
# replaec ' ' with '+'
l = _.string.split(s, ' ')
for i in l:
res.append(quote(i, safe))
return _.string.join(res, '+')
else:
return quote(s, safe)


def urlencode(dict):
 global quote_plus
 l = []
 for k, v in dict.items():
 k = quote_plus(str(k))
 v = quote_plus(str(v))
 l.append(k + '=' + v)
 return _.string.join(l, '')


return urlencode(vars)
/code
/method 2


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




[Zope] Choose where to create a ZClass instance with EM

2000-08-17 Thread Francois-Regis CHALAOUX

Hi,

When I create a ZClass instance from an external Method I create by default
the instance in the same place where is located my external method (see the
code below).

How to select a different place in my script where will be create the ZClass ?


Code


def addZClass(self,id,data):
   newob=self.Control.Panel.Products.MyProduct.MyClass(id)
   newob.id=id
   newob.propertysheets.Properties.manage_changeProperties(data)
   self._setObject(id,newob)
   newob.reindex_object()


Bye, FR.
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  


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




RE: [Zope] How to use RESPONSE.redirect ?

2000-08-17 Thread Stuart Foster

Thanks for the input.

-Original Message-
From: Curtis Maloney [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 15, 2000 5:59 PM
To: Stuart Foster; Zope List
Subject: Re: [Zope] How to use RESPONSE.redirect ?


On Wed, 16 Aug 2000, Stuart Foster wrote:
 I want to use redirect to call another form passing the current form, how
 can I do that.

 dtml-call RESPONSE.redirect('otherform'+?)

 If I do
 dtml-call RESPONSE.redirect('otherform')
 The current form isn't being passed ?

If you want to pass the form variables, you're in for a fight. (o8
otherwise, you could simply try :

dtml-var "otherform(_.None, _)" instead of a redirect.

If you want to make sure only the correct form vars are passed, you could
flub it with something like:

dtml-call "RESPONSE.redirect('otherform?var1=%svar2=%s' % (var1, var2) )"

If this doesn't help, some more detail on your part might. (o8

 Any ideas..

 TIA
 Stuart


Have a better one,
Curtis.


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




[Zope] mysqlUserFolder woes

2000-08-17 Thread Stephen Harrison

I've been trying out mysqlUserFolder lately, but have had quite a major
problem with it.

Basically, everything works fine - for a while - then it starts to
intermittently fail as the load to the server increases, until it is
completley broken, with the system error below.

Has anyone else come across this, or is it just me?

Cheers,
Stephen

Error Type: SystemError
Error Value: Failed to import class ImplicitAcquirerWrapper from module
Acquisition

Traceback (innermost last):
  File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 214,
in publish_module
  File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 179,
in publish
  File /usr/local/zope/2-1-6/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 151,
in publish
  File
/usr/local/zope/2-1-6/lib/python/Products/SiteAccess/ChangeBehaviors.py,
line 226, in traverse
  File /usr/local/zope/hack/2-1-6/lib/python/ZPublisher/BaseRequest.py,
line 504, in old_validation
  File /usr/local/zope/2-1-6/lib/python/ZODB/Connection.py, line 396, in
setstate
SystemError: (see above)


-- 
Stephen Harrison[EMAIL PROTECTED]
New Information Paradigms   www.nipltd.com

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




[Zope] zCatalog and subobjects

2000-08-17 Thread Menard . Jean-Francois

I'm trying to search a zCatalog to find all the objects containing a certain
type of sub-object.  

Right now, I use a dtml-if inside the result loop, but the result count is
obviously wrong.

There must be a better way to do this, right?

Jean-François Ménard
Intranet DPAS
Pratiques d'affaires et orientations
*(514) 840-3000  poste 3939
*  (514) 840-5585
*  [EMAIL PROTECTED]
* 855 Ste-Catherine est, 6e étage
  Montréal, Qué. H2L 4P5


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




[Zope] Product inhetitance question

2000-08-17 Thread Daniel Rusch

Hey all,

Say I have a fully functional (and more importantly, working) Product
will call A.

I want to extend this Product's capabilities so I wish to derive another
class from it, call it B.

No problem,

class B(A):
.


The question is, (I think the answer is no) is there a way to inherit
(i.e. reuse common code and extend it) the manage_Add function and the
dtml files from A???

Thanks,

DR



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




Re: [Zope] mysqlUserFolder woes

2000-08-17 Thread Stephen Harrison

Tony McDonald wrote:
 
 I'd suggest using UserDB. It's been pretty good for us. I looked at
 mysqlUserFolder (seemed overly complex), GUF (couldn't get it to
 work) and even LoginManager (too much Zen needed) and came back to
 UserDB.

One of the reasons I was trying to get mysqlUserFolder to work, is that
I want to be able to store arbitrary data with the user record, such as
real name, email address, etc.  mysqlUserFolder does this quite nicely. 
If there is an easy way to achieve this using userDb then that would be
another way to solve the problem.

Cheers,
Stephen

-- 
Stephen Harrison[EMAIL PROTECTED]
New Information Paradigms   www.nipltd.com

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




Re: [Zope] Zope and VirtualHost

2000-08-17 Thread Andy McKay

Yep Site Access is the product to go for, it includes help on how to use
with Apache if I recall.

--
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message -
From: "William JOYE" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 8:48 AM
Subject: [Zope] Zope and VirtualHost


 What's is the best way to host multiple virtual domain in Zope with Apache
 sever ?

 Actually, I use PCGI method with rewrite rules in Apache configuration
like
 this :

 RewriteEngine on

 RewriteCond %{HTTP:Authorization} ^(.*)

 RewriteRule ^/(.*) /home/httpd/cgi-bin/Zope/MySite/$1
 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]

 But I can't use BASE or URL variables because they always include 'MySite'
 folder. Is SiteAccess product can help me ?


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



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




RE: [Zope] getting rid of PTKDemo

2000-08-17 Thread Tony McDonald

At 7:22 pm +0200 16/8/00, [EMAIL PROTECTED] wrote:
Hello Tony, sure I would come for such a pint offered, but for now, I am in
just the same situation - without access to this tab of any ZSQL method. So,
please, should you get an answer (I mean, a solution) could you be so kind
to share it with me?

I'm not sure that this is a solution Ralf, but it fixed something 
here and made the ZSQL advanced tab usable again.
I was having problems importing a folder. Errors like 'KeyError' with 
a crap character were showing up when I tried to import.
I found that in the folder were subfolders with an ID of the type 
'folder.gif', and title 'c://Dan/Images/folder.gif' - ie as though 
someone had uploaded an image, but it had created a folder instead 
(this behaviour by itself is pretty weird).
I deleted these folders, and exported the folder I was interested in.

I then got a clean 2.2.0 Data.fs.in and started up another Zope 
instance (BTW, the excellent HowTo at 
http://www.zope.org/Members/4am/instancehome should be required 
reading for those running multiple Zope sites from a single Zope 
installation...). I then imported the .zexp file and voila, 
everything was working and I could get to my 'Advanced' tab again.

I have no idea whether PTKDemo is in my Data.fs, but this is encouraging! :)
112 % grep PTKDemo Data.fs | more

113 % grep MySQL Data.fs | more
Binary file Data.fs matches

(and the old Data.fs)
116 % grep PTKDemo Data.fs- | more
Binary file Data.fs- matches

If you *don't* have any ID's with 'unusual' characters in them, then 
I guess I can't help you out...

Thank again, greeting from a Berlin draught drinker...

-- Ralf Herold

:)

Tone
ps Ralf, I've taken the liberty of ccing this to the list as it might 
help others...
--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5116
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

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




Re: [Zope] mysqlUserFolder woes

2000-08-17 Thread Tony McDonald

At 4:12 pm +0100 17/8/00, Stephen Harrison wrote:
I've been trying out mysqlUserFolder lately, but have had quite a major
problem with it.

Basically, everything works fine - for a while - then it starts to
intermittently fail as the load to the server increases, until it is
completley broken, with the system error below.

Has anyone else come across this, or is it just me?

Cheers,
Stephen

I'd suggest using UserDB. It's been pretty good for us. I looked at 
mysqlUserFolder (seemed overly complex), GUF (couldn't get it to 
work) and even LoginManager (too much Zen needed) and came back to 
UserDB.

hth
tone
--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5116
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

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




Re: [Zope] Old Zope packages

2000-08-17 Thread Martijn Pieters

On Thu, Aug 17, 2000 at 05:01:01PM +0300, Jarkko Veijalainen wrote:
 problem is that it don't allow ANY of my users (including managers and
 superuser) to pass Authentication when i'm trying to POST data to another
 dtml document, which calls external method?
 
 How i manage this? I'm desperated

Hallo Jarko,

I really don't know, especially not without some more context.

However, could you keep on sending questions to the Mailing Lists? You'll
have far better chances at getting an answer there. I'll include
[EMAIL PROTECTED] for this one.

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

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




RE: [Zope] Zope and VirtualHost

2000-08-17 Thread William JOYE

Are there restrictions or problems to use SiteAccess ?

 -Message d'origine-
 De : Andy McKay [mailto:[EMAIL PROTECTED]]
 Envoyé : jeudi 17 août 2000 17:53
 À : William JOYE; [EMAIL PROTECTED]
 Objet : Re: [Zope] Zope and VirtualHost
 
 
 Yep Site Access is the product to go for, it includes help on 
 how to use
 with Apache if I recall.
 
 --
  Andy McKay, Developer, ActiveState
  http://www.ActiveState.com
  Programming for the People
 
 
 - Original Message -
 From: "William JOYE" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 17, 2000 8:48 AM
 Subject: [Zope] Zope and VirtualHost
 
 
  What's is the best way to host multiple virtual domain in 
 Zope with Apache
  sever ?
 
  Actually, I use PCGI method with rewrite rules in Apache 
 configuration
 like
  this :
 
  RewriteEngine on
 
  RewriteCond %{HTTP:Authorization} ^(.*)
 
  RewriteRule ^/(.*) /home/httpd/cgi-bin/Zope/MySite/$1
  [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
 
  But I can't use BASE or URL variables because they always 
 include 'MySite'
  folder. Is SiteAccess product can help me ?
 
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 

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




Re: [Zope] Product inhetitance question

2000-08-17 Thread Andy McKay

Well by inheritance B has all the methods, properties etc you have in A. So
the answer is yes, if A has the foobar method then B will have a foobar
method.

Or do I misunderstand your question?
--
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message -
From: "Daniel Rusch" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 8:42 AM
Subject: [Zope] Product inhetitance question


 Hey all,

 Say I have a fully functional (and more importantly, working) Product
 will call A.

 I want to extend this Product's capabilities so I wish to derive another
 class from it, call it B.

 No problem,

 class B(A):
 .


 The question is, (I think the answer is no) is there a way to inherit
 (i.e. reuse common code and extend it) the manage_Add function and the
 dtml files from A???

 Thanks,

 DR



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



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




[Zope] Total newbie with NTUserFolder 1.3 issues

2000-08-17 Thread Christian Adams

I'm running Zope 2.2.0 over NT Server 4.

I installed Python 1.5.2 and the latest Win32 Extensions, then unzipped
NTUserFolder1.3.zip into C:\Program Files\ZopeServer\NTUserFolder, then ran
both the init.py and NTUserFolder.py files after entering my Domain and PDC
info into NTUserFolder.py 
I ran them both to get the respective .pyc files... my question is...

What now? What do I need to do next to actually get this stuff working as
opposed to taking up disk space, because nothing yet has actually happened
and, even if It has, I have no idea how to find out. I've been checking for
a Users registry entry in HKLM\Software\Digital Creations\zope\ but it
doesn't exist...

I get the feeling that something major, like The Point has passed me by and
I can't find Docs on this anywhere.

help me, Obi-Wan Kenobi, you're my only z^Hhope.

Chris.

 Chris Adams
 Revolution - the new commerce agency
 --
 Direct: +44 20 7549 5837
 Facsimile: +44 20 7549 5801
 http://www.revolutionltd.com
 
 

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




Re: [Zope] Zope is very slow!

2000-08-17 Thread Andy McKay

 Upgrade to 2.2.1 (60% faster on dual processors).

Really? I didnt see anything about this in the Changes file... has something
else changed I didnt see? I noticed that 2.1.6 wasnt making the best use of
dual processors.

--
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People



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




Re: [Zope] Choose where to create a ZClass instance with EM

2000-08-17 Thread Andy McKay

Get a handle to the object where you wish to create the object then create
the object.

For example: newobj = getattr(self, 'folderA')

will give you folderA in self. The new object will be created in folderA.
--
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message -
From: "Francois-Regis CHALAOUX"
[EMAIL PROTECTED]
To: "Receipt Notification Requested" [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 6:36 AM
Subject: [Zope] Choose where to create a ZClass instance with EM


 Hi,

 When I create a ZClass instance from an external Method I create by
default
 the instance in the same place where is located my external method (see
the
 code below).

 How to select a different place in my script where will be create the
ZClass ?

 
 Code
 

 def addZClass(self,id,data):
newob=self.Control.Panel.Products.MyProduct.MyClass(id)
newob.id=id
newob.propertysheets.Properties.manage_changeProperties(data)
self._setObject(id,newob)
newob.reindex_object()


 Bye, FR.

















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



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




Re: [Zope] Announce: Squishdot 0.5.0 now available!

2000-08-17 Thread Andy McKay

Good job Chris.

-- 
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message - 
From: "Chris Withers" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 5:36 AM
Subject: [Zope] Announce: Squishdot 0.5.0 now available!


 Squishdot 0.5.0 is now available from 
 http://www.zope.org/Members/chrisw/Squishdot/
 
 The following changes were made:
 
  - Support has been added for postings to be formatted as Plain Text, 
HTML or Structured text on the same site.
 
  - You can preview when editing postings through the management 
interface. 
 
 A whole host of bugs were also fixed, the most notable being the one
 which caused the 'managemanage_editForm' bug.
 
 Sadly, Squishdot does not yet work with Zope 2.2 :(
 
 If you run into problems, remember Squishdot has a mailing list at 
 eGroups and a bug collector on SourceForge.
 
 cheers,
 
 Chris
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


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




[Zope] NewBIE Question

2000-08-17 Thread CURTIS David

After re-installing zope on NT box, I noticed that I am now running two instances of 
the Zope service.  I was able to disable one instance but how can I permanatly remove 
the service and how do I know which Zope service is running?

   
   
   
   
   
  

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




Re: [Zope] Zope is very slow!

2000-08-17 Thread J. Atwood

I am pretty sure (61%) that in the original release of 2.2.0 there was
something about a speed increase. One talked about on single processor
(20-40%) and the other was dual processor (60-80%). It partly has to do with
that "one line of magic code" in the z2.py.

Ethan? Paul? DC? Care to shed some light?

J

 From: Chris Withers [EMAIL PROTECTED]
 Organization: New Information Paradigms
 Date: Thu, 17 Aug 2000 17:15:57 +0100
 To: Andy McKay [EMAIL PROTECTED]
 Cc: "J. Atwood" [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: [Zope] Zope is very slow!
 
 Andy McKay wrote:
 
 Upgrade to 2.2.1 (60% faster on dual processors).
 
 Really? I didnt see anything about this in the Changes file... has something
 else changed I didnt see? I noticed that 2.1.6 wasnt making the best use of
 dual processors.
 
 I thought only ZEO would make good use fo dual processors?
 
 Chris
 


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




[Zope] NTUserFolder-1.3-Comments

2000-08-17 Thread Jean Jordaan

Hi Toby

In the source of NTUserFolder from end of last year I see:

## Experimental support for authenticating from a domain
## (rather than the local computer) Use this at your own
## risk. If you do, please let me know how you get on. I will
## only include a user interface for these parameters once I
## have independant verification that there are no problems.

Have you had any feedback? Does this work at all? 

-- 
Jean Jordaan   --technical writer--
Mosaic Sofware --Zope 2.1.6 on WinNT and W2K

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




Re: [Zope] Zope and VirtualHost

2000-08-17 Thread J. Atwood

 From: William JOYE [EMAIL PROTECTED]
 Date: Thu, 17 Aug 2000 18:06:08 +0200
 To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED]
 Subject: RE: [Zope] Zope and VirtualHost
 
 Are there restrictions or problems to use SiteAccess ?

I have been using it for a couple of different sites (2 served off of one
Zope and 5 served off another) and it has been pretty good. There are few
products that are not crazy about it (breadcrumbs) but there are easy work
arounds. I think Zope.org is now using it for dev.zope.org

J


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




Re: [Zope] Choose where to create a ZClass instance with EM

2000-08-17 Thread R. David Murray

On Thu, 17 Aug 2000, Andy McKay wrote:
 Get a handle to the object where you wish to create the object then create
 the object.
 
 For example: newobj = getattr(self, 'folderA')
 
 will give you folderA in self. The new object will be created in folderA.

Isn't it actually that he wants to do the _setObject call on object where
he wants the thing to go?:

newob=self.Control.Panel.Products.MyProduct.MyClass(id)
newob.id=id
newob.propertysheets.Properties.manage_changeProperties(data)
getattr(self,'folderA')._setObject(id,newob)
newob.reindex_object()

--RDM


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




[Zope] Getting rid of PTK

2000-08-17 Thread Jean Jordaan

Hi list 

I've seen others having problems with this as well .. 

I made a ZClass, not consciously touching anything about
PTK. Now when I export it ('ccDoc.zexp') and import it into
another Zope, I get::

  Error Type: ImportError
  Error Value: No module named PTKDemo.PersistentUserSource

  Traceback (innermost last):
  File C:\programs\ZopeJean\lib\python\ZPublisher\Publish.py, line 214, in
publish_module
  File C:\programs\ZopeJean\lib\python\ZPublisher\Publish.py, line 179, in
publish
  File C:\programs\ZopeJean\lib\python\Zope\__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File C:\programs\ZopeJean\lib\python\ZPublisher\Publish.py, line 165, in
publish
  File C:\programs\ZopeJean\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: manage_importObject)
  File C:\programs\ZopeJean\lib\python\ZPublisher\Publish.py, line 102, in
call_object
(Object: manage_importObject)
  File C:\programs\ZopeJean\lib\python\OFS\ObjectManager.py, line 488, in
manage_importObject
(Object: ElementWithAttributes)
  File C:\programs\ZopeJean\lib\python\OFS\ObjectManager.py, line 238, in
_setObject
(Object: ElementWithAttributes)
  File C:\programs\ZopeJean\lib\python\OFS\ObjectManager.py, line 254, in
manage_afterAdd
(Object: ElementWithAttributes)
  File C:\programs\ZopeJean\lib\python\ZClasses\ZClass.py, line 412, in
manage_afterAdd
(Object: ccDocClass)
  File C:\programs\ZopeJean\lib\python\ZClasses\ZClass.py, line 373, in
_register
(Object: ccDocClass)
  File C:\programs\ZopeJean\lib\python\ZODB\Connection.py, line 396, in
setstate
  File C:\programs\ZopeJean\lib\python\ZODB\Connection.py, line 205, in
_persistent_load
(Info: 

What do I have to do with PTKDemo??

-- 
Jean Jordaan   --technical writer--
Mosaic Sofware --Zope 2.1.6 on WinNT and W2K

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




RE: [Zope] Zope is very slow!

2000-08-17 Thread Brian Lloyd

 I am pretty sure (61%) that in the original release of 2.2.0 there was
 something about a speed increase. One talked about on single processor
 (20-40%) and the other was dual processor (60-80%). It partly 
 has to do with
 that "one line of magic code" in the z2.py.
 
 Ethan? Paul? DC? Care to shed some light?

The speedup involves changing sys.checkinterval, which 
controls the interval (# of bytecodes) at which the 
Python runtime performs certain housekeeping chores. 
For multithreaded programs, upping this interval can 
cause a significant performance improvement (more about
this on python.org in the sys module docs).

2.2 sets the interval to 120, a value that seemed to 
provide a general speedup across a number of systems 
I tested. Granted, this is not very scientific, which 
is why there is an '-i' option to z2.py that allows you 
to pass your own values for the interval to experiment 
and find a sweet spot for your given environment (see 
the z2.py docstring / command help).

  else changed I didnt see? I noticed that 2.1.6 wasnt 
 making the best use of
  dual processors.
  
  I thought only ZEO would make good use fo dual processors?

Note that effective use of multiple processors is mostly a 
function of the Python runtime (specifically the global 
interpreter lock) rather than an issue that Zope can 
address directly. So yes, ZEO is the best way to make 
effective use of MP.


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



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




Re: [Zope] Zope culture (Was: [Zope] Simple DTML date-stamp)

2000-08-17 Thread Andy Dustman

On Mon, 14 Aug 2000, William BC Crandall wrote:

 Andy Dustman's documentation for what seems like a nice 
 MySQL interface puts it clearly:
 
   PWindows is EMnot/EM a supported platform. 

Yeah, that's just me. I don't support Windows in any way. However, MySQLdb
does work there, so I am told. If you can't get it to compile or
something, I can't help you.

-- 
andy dustman   | programmer/analyst |  comstar.net, inc.
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"


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




Re: [Zope] Zope is very slow!

2000-08-17 Thread J. Atwood

I have limited experience with ProxyPass. I have many Zope installations
(2.1.4, 2.1.6, 2.2.0b2, 2.2.0) on all sorts of different hardware
configurations (all RH Linux) and non of them are slow. Most are running
just plain ZServer but one (and the most hit) is running behind Apache with
Zope.cgi. I suggest trying that and seeing if it makes a difference.

J

 From: Christiano Anderson [EMAIL PROTECTED]
 Date: Thu, 17 Aug 2000 14:36:42 -0300 (BRT)
 To: "J. Atwood" [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope] Zope is very slow!
 
 
 Hi J,
 
 Thanks a lot for replying my message! :)
 
 Do you have any example of the best Apache and ProxyCache configuration to
 running zope?
 
 My configuration looks like this:
 
 IfModule mod_proxy.c
 ProxyRequests On
 #ProxyReceiveBufferSize 65536
 ProxyReceiveBufferSize 0
 CacheRoot "/www/proxycache"
 CacheSize 5000
 CacheGcInterval 1
 CacheMaxExpire 48
 CacheLastModifiedFactor 0.1
 CacheDefaultExpire 5
 ProxyPass /paginas/ http://200.xxx.xxx.xxx:8080/
 ProxyPass /p_/ http://200.xxx.xxx.xxx:8080/p_/
 ProxyPass /misc_/ http://200.xxx.xxx.xxx:8080/misc_/
 ProxyPassReverse /paginas/ http://200.xxx.xxx.xxx:8080/
 ProxyPassReverse /p_/ http://200.xxx.xxx.xxx:8080/p_/
 ProxyPassReverse /misc_/ http://200.xxx.xxx.xxx:8080/misc_/
 
 The TOP result is:
 
 Memory: 2048M real, 524M free, 7184K swap in use, 2041M swap free
 
 PID USERNAME THR PRI NICE  SIZE   RES STATE   TIMECPU COMMAND
 8035 nobody11  310   13M   13M cpu0  174:10 29.70% python
 
 
 Only the Zope pages are slowly... The Apache is working properly...
 
 Thanks a lot for any help,
 
 Christiano
 
 
 On Thu, 17 Aug 2000, J. Atwood wrote:
 
 Hi Christiano (nice first message... :)  )
 
 First of all, lets define slow. What does slow mean? Have you tested it with
 AB (apachebench)? You sure it is not your connection? Watched it in TOP? My
 guess is that with 2.1.6 (straight) on that system you should be able to get
 about 200 requests per second which is not SLOW at all.
 
 Check your Apache, Proxycache and SiteAccess my guess it is there.
 
 Turn off debugging.
 
 Upgrade to 2.2.1 (60% faster on dual processors).
 
 Take a look at 
 
 http://www.zope.org/Members/BwanaZulia/benchmarks.html to get an idea of
 what you system should be doing.
 
 Just some suggestions.
 
 J
 
 From: Christiano Anderson [EMAIL PROTECTED]
 Date: Thu, 17 Aug 2000 11:12:00 -0300 (BRT)
 To: [EMAIL PROTECTED]
 Subject: [Zope] Zope is very slow!
 
 Hi,
 
 This is my first message to the list...
 
 I'm currently running Zope 2.1.6 + Apache 1.3.12 (with proxycache). The
 system is a Solaris 5.6 on a E450 with 2GB Ram and 2 X 450mhz...
 
 The Zope is running with Apache, using the ProxyCache and SiteAccess to
 convert all requests from port 8080 to 80.
 
 My problem is: The system is *too slowly*!
 
 Does anyone know how to optimize the Zope to run quicker? Is there
 anything wrong with this configuration??
 
 Thanks a lot,
 
 Christiano Anderson
 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
 
 
 
 
 
 


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




Re: [Zope] Zserver vs Apache

2000-08-17 Thread J. Atwood

(man this is coming up a lot today)

It is not ZServer vs Apache but ZServer alone or behind Apache. Either way
you are using ZServer.

ZServer will do all of your http requests and as a stand alone server it
will work just fine. It is faster than putting Apache in front of it and is
certainly easier to set up. It does not however offer SSL (think there is a
product for this) and if you are in a mixed environment (meaning you don't
control the webserver) it is easier to put behind Apache (many ways). I have
a couple different sites doing to both ways. I, PERSONALLY, like ZServer
alone. I find the logging situation better, the speed better and is less
things running on the server.

J

 From: Corey [EMAIL PROTECTED]
 Date: Thu, 17 Aug 2000 09:57:00 -0700
 To: [EMAIL PROTECTED]
 Subject: [Zope] Zserver vs Apache
 
 I keep seeming to notice that the docs are constantly referring
 to Zserver as the recomended choice for the http backend. Why
 is this?  Should I not attempt to integrate our Apache server
 with Zope, and simply use Zserver instead?
 
 
 Thanks,
 
 Corey
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


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




[Zope] Zope appears to be busy ;-)

2000-08-17 Thread Chris Withers

Christiano Anderson wrote:
 The TOP result is:
 
 Memory: 2048M real, 524M free, 7184K swap in use, 2041M swap free
 
   PID USERNAME THR PRI NICE  SIZE   RES STATE   TIMECPU COMMAND
  8035 nobody11  310   13M   13M cpu0  174:10 29.70% python

30% seems qutie high to me.

What are your Zope pages doing and how many people are hitting them?

Cheers,

Chris

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




Re: [Zope] Zope is very slow!

2000-08-17 Thread Christiano Anderson


Hi J,

Thanks a lot for replying my message! :)

Do you have any example of the best Apache and ProxyCache configuration to
running zope?

My configuration looks like this:

IfModule mod_proxy.c
ProxyRequests On
#ProxyReceiveBufferSize 65536
ProxyReceiveBufferSize 0
CacheRoot "/www/proxycache"
CacheSize 5000
CacheGcInterval 1
CacheMaxExpire 48
CacheLastModifiedFactor 0.1
CacheDefaultExpire 5
ProxyPass /paginas/ http://200.xxx.xxx.xxx:8080/
ProxyPass /p_/ http://200.xxx.xxx.xxx:8080/p_/
ProxyPass /misc_/ http://200.xxx.xxx.xxx:8080/misc_/
ProxyPassReverse /paginas/ http://200.xxx.xxx.xxx:8080/
ProxyPassReverse /p_/ http://200.xxx.xxx.xxx:8080/p_/
ProxyPassReverse /misc_/ http://200.xxx.xxx.xxx:8080/misc_/

The TOP result is:

Memory: 2048M real, 524M free, 7184K swap in use, 2041M swap free

  PID USERNAME THR PRI NICE  SIZE   RES STATE   TIMECPU COMMAND
 8035 nobody11  310   13M   13M cpu0  174:10 29.70% python 


Only the Zope pages are slowly... The Apache is working properly...

Thanks a lot for any help,

Christiano


On Thu, 17 Aug 2000, J. Atwood wrote:

 Hi Christiano (nice first message... :)  )
 
 First of all, lets define slow. What does slow mean? Have you tested it with
 AB (apachebench)? You sure it is not your connection? Watched it in TOP? My
 guess is that with 2.1.6 (straight) on that system you should be able to get
 about 200 requests per second which is not SLOW at all.
 
 Check your Apache, Proxycache and SiteAccess my guess it is there.
 
 Turn off debugging.
 
 Upgrade to 2.2.1 (60% faster on dual processors).
 
 Take a look at 
 
 http://www.zope.org/Members/BwanaZulia/benchmarks.html to get an idea of
 what you system should be doing.
 
 Just some suggestions.
 
 J
 
  From: Christiano Anderson [EMAIL PROTECTED]
  Date: Thu, 17 Aug 2000 11:12:00 -0300 (BRT)
  To: [EMAIL PROTECTED]
  Subject: [Zope] Zope is very slow!
  
  Hi,
  
  This is my first message to the list...
  
  I'm currently running Zope 2.1.6 + Apache 1.3.12 (with proxycache). The
  system is a Solaris 5.6 on a E450 with 2GB Ram and 2 X 450mhz...
  
  The Zope is running with Apache, using the ProxyCache and SiteAccess to
  convert all requests from port 8080 to 80.
  
  My problem is: The system is *too slowly*!
  
  Does anyone know how to optimize the Zope to run quicker? Is there
  anything wrong with this configuration??
  
  Thanks a lot,
  
  Christiano Anderson
  
  
  
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
  
  
 
 


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




[Zope] Zserver+Apache ProxyPass beats Apache + Zope CGI?

2000-08-17 Thread Chris Withers

Corey wrote:
 I keep seeming to notice that the docs are constantly referring
 to Zserver as the recomended choice for the http backend. Why
 is this?  Should I not attempt to integrate our Apache server
 with Zope, and simply use Zserver instead?

Well, ZServer seems to be the best way to go.

...that is opposed to doing it with PGCI or FastCGI

Apache still makes a good bulletproof front end, but use to to proxypass
through to ZServer ratehr than running Zope as CGI.

cheers,

Chris

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




[Zope] New Release of gvibDA Interbase Adapter

2000-08-17 Thread Bob Tierney

Hello Everyone,

We just release Version 0.9.1 of our Interbase Database Adapter.  This
release fixes a memory leak when fething BLOB data and also dramtically
improves performance when fetching BLOB data.  Thank you and the code is
at http://www.zope.org/Members/RETierney/gvibDA

Regards,

Bob Tierney

_

Robert E. Tierney   EMail: [EMAIL PROTECTED]
Going VirtualHTTP: www.goingv.com
10800 Independence Pointe Pkwy  Phone: 1-704-849-0731 x109
Matthews, NC 28105Fax: 1-704-849-2279
  AIM: RETierney
_


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




[Zope] The date in Dutch

2000-08-17 Thread Michel Houben

How can I fix the date in Dutch, for example Donderdag 17 Augustus 2000 
instead of Thursday 17 August 2000. I hope someone can solve this problem.

Michel Houben.


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




[Zope] EventLogManger

2000-08-17 Thread Chris McDonough

The 1.0 version of EventLogManager (a configurable logging facility
product) depended on code that only existed inside of the CVS version of
Zope.  It would not install cleanly as a result on Zope 2.2.1b1 and
previous.  A new release (1.1) is available at
http://www.zope.org/Members/mcdonc/Products/EventLogManager.

Thanks,


-- 
Chris McDonough
Digital Creations
Publishers of Zope - http://www.zope.org

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




Re: [Zope] Product inhetitance question

2000-08-17 Thread Andy McKay

- Original Message -
From: "Andy McKay" [EMAIL PROTECTED]
To: "Daniel Rusch" [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 11:21 AM
Subject: Re: [Zope] Product inhetitance question


 Ah... ok sorry you are right, stuff outside the class doesnt get
inherited.
 What I did for this was make a very generic manage_addProduct and specify
in
 my _init_.py a class initialisation string or whatever it is called...

 context.registerClass(A.ObjB, permission='Add ObjB',
 constructors=(A.addForm, A.manage_addA) )

 If that makes sense. The manage_AddObject form creates an the right object
 depending upon paramaters passed to it.

 --
  Andy McKay, Developer, ActiveState
  http://www.ActiveState.com
  Programming for the People


 - Original Message -
 From: "Daniel Rusch" [EMAIL PROTECTED]
 To: "Andy McKay" [EMAIL PROTECTED]
 Sent: Thursday, August 17, 2000 9:10 AM
 Subject: Re: [Zope] Product inhetitance question


  Slightly,
 
  I understand that if A has foo() then so does B(). But in a Zope product
 the
  are some things that lie "outside" of the class definition. The
manage_add
  function is one of them. addtionally, I am having troubles getting B to
  inherit A's _properties structure.
 
  Thanks for all your help. I have learned an unbelieveable amount this
 week.
  Everyone else is gone and we are in a slow period so I wanted to learn
the
  more advanced techniques this week.
 
  Dan
 
  Andy McKay wrote:
 
   Well by inheritance B has all the methods, properties etc you have in
A.
 So
   the answer is yes, if A has the foobar method then B will have a
foobar
   method.
  
   Or do I misunderstand your question?
   --
Andy McKay, Developer, ActiveState
http://www.ActiveState.com
Programming for the People
  
   - Original Message -
   From: "Daniel Rusch" [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Thursday, August 17, 2000 8:42 AM
   Subject: [Zope] Product inhetitance question
  
Hey all,
   
Say I have a fully functional (and more importantly, working)
Product
will call A.
   
I want to extend this Product's capabilities so I wish to derive
 another
class from it, call it B.
   
No problem,
   
class B(A):
.
   
   
The question is, (I think the answer is no) is there a way to
inherit
(i.e. reuse common code and extend it) the manage_Add function and
the
dtml files from A???
   
Thanks,
   
DR
   
   
   
___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
   
 



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




[Zope] getting base classes's (super class) _properties tuple

2000-08-17 Thread Daniel Rusch

Say I have a fully functional (and more importantly, working) Product
will call A.

I want to extend this Product's capabilities so I wish to derive another

class from it, call it B.

No problem,

class B(A):
.

now in class B I want to add a new property.

Is the a way of getting the base (super) class _properties tuple and
just adding the new one to it. Since a tuple is an immutable object I
can't do this:
_properties=A._properties.append({'id':'RenderStandardHeader',
'type':'int','mode':'w'})

Any thoughts 

DR


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




Re: [Zope] getting base classes's (super class) _properties tuple

2000-08-17 Thread Andy McKay

class A:
_properties = [ {'a':'A', 'aa':'AA'}, ]

class B(A):
_properties = [ {'b':'B', 'bb':'BB'}, ]
_properties = _properties + A._properties 

b = B()
print b._properties

Works for me.
-- 
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message - 
From: "Daniel Rusch" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 11:30 AM
Subject: [Zope] getting base classes's (super class) _properties tuple


 Say I have a fully functional (and more importantly, working) Product
 will call A.
 
 I want to extend this Product's capabilities so I wish to derive another
 
 class from it, call it B.
 
 No problem,
 
 class B(A):
 .
 
 now in class B I want to add a new property.
 
 Is the a way of getting the base (super) class _properties tuple and
 just adding the new one to it. Since a tuple is an immutable object I
 can't do this:
 _properties=A._properties.append({'id':'RenderStandardHeader',
 'type':'int','mode':'w'})
 
 Any thoughts 
 
 DR
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


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




[Zope] Re: Zope appears to be busy ;-)

2000-08-17 Thread J. Atwood

30% is not bad... depends on what it is doing and for how much time. My
experience is that it can pop up to as much as 90% (on a slower CPU like 166
Mhz) but only for a split second. At idle (no one doing anything) it should
be using no CPU.

PID USER PRI  NI TSIZE  SIZE SWAP  RSS SHARE STAT  LIB %CPU %MEM  CTIME
COMMAND
23344 nobody 0   0   403 58876 1284  56M  1280 S   0  0.0 22.3
22:33 python
23347 nobody 0   0   403 58876 1284  56M  1280 S   0  0.0 22.3
0:00 python
23348 nobody 0   0   403 58876 1284  56M  1280 S   0  0.0 22.3
23:46 python
23349 nobody 0   0   403 58876 1284  56M  1280 S   0  0.0 22.3
16:47 python
23350 nobody 0   0   403 58876 1284  56M  1280 S   0  0.0 22.3
28:55 python
23351 nobody 0   0   403 58876 1284  56M  1280 S   0  0.0 22.3
12:24 python

Like that.

J

 From: Chris Withers [EMAIL PROTECTED]
 Organization: New Information Paradigms
 Date: Thu, 17 Aug 2000 18:54:17 +0100
 To: Christiano Anderson [EMAIL PROTECTED]
 Cc: "J. Atwood" [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Zope appears to be busy ;-)
 
 Christiano Anderson wrote:
 The TOP result is:
 
 Memory: 2048M real, 524M free, 7184K swap in use, 2041M swap free
 
 PID USERNAME THR PRI NICE  SIZE   RES STATE   TIMECPU COMMAND
 8035 nobody11  310   13M   13M cpu0  174:10 29.70% python
 
 30% seems qutie high to me.
 
 What are your Zope pages doing and how many people are hitting them?
 
 Cheers,
 
 Chris
 


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




Re: [Zope] mysqlUserFolder woes

2000-08-17 Thread Dieter Maurer

Stephen Harrison writes:
  Error Type: SystemError
  Error Value: Failed to import class ImplicitAcquirerWrapper from module
  Acquisition
  
  Traceback (innermost last):

File /usr/local/zope/2-1-6/lib/python/ZODB/Connection.py, line 396, in
  setstate
  SystemError: (see above)

This signals that a Zope runtime object, i.e. one that is wrapped
into an acquisition context was stored into an object to be pickled.

I saw this several times:

 * someone assigned in an external method to "self":

self.image= 

   with "" being a Zope runtime object.


 * someone added a Zope object to a session instance


I can not help you with your concrete problem.


Dieter

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




Re: [Zope] Choose where to create a ZClass instance with EM

2000-08-17 Thread Dieter Maurer

Francois-Regis CHALAOUX writes:
  Hi,
  
  When I create a ZClass instance from an external Method I create by default
  the instance in the same place where is located my external method (see the
  code below).
  
  How to select a different place in my script where will be create the ZClass ?
  
  
  Code
  
  
  def addZClass(self,id,data):
 newob=self.Control.Panel.Products.MyProduct.MyClass(id)
 newob.id=id
 newob.propertysheets.Properties.manage_changeProperties(data)
 self._setObject(id,newob)
Here, you decide that the new object is placed into "self".

Use "self.whereever._setObject(id,newob)"
to place it in "whereever".
Of cause, "whereever" must be acquired by "self" for this to work.

You would use "getattr(self,wherever)", if "whereever" is not
a constant name but an expression, e.g. passed in via a parameter.



Dieter

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




[Zope] zCatalog and subobjects

2000-08-17 Thread Menard . Jean-Francois

(Post #2)
I'm trying to search a zCatalog to find all the objects containing a certain
type of sub-object.  

Right now, I use a dtml-if inside the result loop, but the result count is
obviously wrong.

There must be a better way to do this, right?

Jean-François Ménard
Intranet DPAS
Pratiques d'affaires et orientations
*(514) 840-3000  poste 3939
*  (514) 840-5585
*  [EMAIL PROTECTED]
* 855 Ste-Catherine est, 6e étage
  Montréal, Qué. H2L 4P5


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




Re: [Zope] modifying/changing DTML properties

2000-08-17 Thread Dieter Maurer

R. David Murray writes:
   This:
 b!--#var eggs --/b
 dtml-call "manage_changeProperties({'eggs': 'blue'})"
   
 p!--#var eggs --
   
   results in:
  bgreen/b
   
  pgreen
   
   did i miss something?
  
  Hmm.  That should have worked.  You could try
  manage_changeProperties(eggs='blue') as an alternative, but the
  dictionary way should have worked.
Maybe, "manage_changeProperties" is called on the wrong
object, i.e. one that does not have an "eggs" property.

Try:

dtml-call "PARENTS[0].manage_changeProperties({'eggs': 'blue'})"

to call it on the folder.


Dieter

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




Re: [Zope] zCatalog and subobjects

2000-08-17 Thread Chris McDonough

ZCatalog doesn't do well on hierarchical searches like this.  The way
you're doing it (without some sort of change to your objects'
structures) is pretty much the only way.  There's a "ZTopics" product
floating around that is supposed to provide functionality like this, but
1) I don't know if it's released, 2) I've never used it.

You *could* add a method to your "superobjects" that returned the
meta_type of all of its subobjects and add that to the Catalog index,
e.g.

def getChildMetaTypes(self):
   return map(lambda x: getattr(x, 'meta_type'), self.objectValues())

then add getChildMetaTypes as a keyword index...

then...

for x in Catalog.searchResults(getChildMetaTypes="My Kind Of Object"):
 ...





[EMAIL PROTECTED] wrote:
 
 (Post #2)
 I'm trying to search a zCatalog to find all the objects containing a certain
 type of sub-object.
 
 Right now, I use a dtml-if inside the result loop, but the result count is
 obviously wrong.
 
 There must be a better way to do this, right?
 
 Jean-François Ménard
 Intranet DPAS
 Pratiques d'affaires et orientations
 *(514) 840-3000  poste 3939
 *  (514) 840-5585
 *  [EMAIL PROTECTED]
 * 855 Ste-Catherine est, 6e étage
   Montréal, Qué. H2L 4P5
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Chris McDonough
Digital Creations
Publishers of Zope - http://www.zope.org

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




Re: [Zope] Product inhetitance question

2000-08-17 Thread Daniel Rusch

This worked for me, what a hack

  _ properties=[]
for i in range(0,len(A._properties)):
_properties.append(A._properties[i])

_properties.append({'id':'RenderStandardHeader', 'type':'int','mode':'w'})
tuple(_properties)


Andy McKay wrote:

 Hmm i just tested it in Zope and it worked fine for me.
 --
  Andy McKay, Developer, ActiveState
  http://www.ActiveState.com
  Programming for the People

 - Original Message -
 From: "Daniel Rusch" [EMAIL PROTECTED]
 To: "Andy McKay" [EMAIL PROTECTED]
 Sent: Thursday, August 17, 2000 11:36 AM
 Subject: Re: [Zope] Product inhetitance question

  Great minds think a like or fools never differ.
 
  I tried this to but I get an error:
  TypeError: bad operand type(s) for +
 
  Dan
 
  Andy McKay wrote:
 
   I just had the exact same problem and I solved this morning by:
  
   class A:
   _properties = ( {...} )
  
   class B(A):
   _properties = ( { new stuff... } )
   _properties = _properties + A._properties
  
   This is tested in a quick script, but not fully in the products yet. So
 this
   will make class B have a properties dict that includes all of A, so you
   shouldnt need to edit manage_edit... in theory!
  
   --
Andy McKay, Developer, ActiveState
http://www.ActiveState.com
Programming for the People
  
   - Original Message -
   From: "Daniel Rusch" [EMAIL PROTECTED]
   To: "Andy McKay" [EMAIL PROTECTED]
   Sent: Thursday, August 17, 2000 9:40 AM
   Subject: Re: [Zope] Product inhetitance question
  
Sorry to keep bothering you, but I'm on the threshold of success
   
my B class has an extra property, therefore B's manage_edit needs to
   address
this. In C++ I could override the base class's manage_edit do the B
 stuff
   and
then call the base class's manage_edit, can this be done in python???
   
Dan
   
Andy McKay wrote:
   
 Well by inheritance B has all the methods, properties etc you have
 in A.
   So
 the answer is yes, if A has the foobar method then B will have a
 foobar
 method.

 Or do I misunderstand your question?
 --
  Andy McKay, Developer, ActiveState
  http://www.ActiveState.com
  Programming for the People

 - Original Message -
 From: "Daniel Rusch" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 17, 2000 8:42 AM
 Subject: [Zope] Product inhetitance question

  Hey all,
 
  Say I have a fully functional (and more importantly, working)
 Product
  will call A.
 
  I want to extend this Product's capabilities so I wish to derive
   another
  class from it, call it B.
 
  No problem,
 
  class B(A):
  .
 
 
  The question is, (I think the answer is no) is there a way to
 inherit
  (i.e. reuse common code and extend it) the manage_Add function and
 the
  dtml files from A???
 
  Thanks,
 
  DR
 
 
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 

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


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




Re: [Zope] getting base classes's (super class) _properties tuple

2000-08-17 Thread Daniel Rusch

I can't believe it, but I didn't have the last comma ({'b':'B', 'bb':'BB'}, )
and that's what was killing me .agh

BTW, I noticed you are using lists of dictionaries instead of the "standard"
tuple of dictionaries. I don't  know if there are any consequences to doing
this.  Anyway, since yours are lists you should be able to to do this:

class A:
_properties = [ {'a':'A', 'aa':'AA'}, ]

class B(A):
_properties = [ {'b':'B', 'bb':'BB'}, ]
_properties.append(A._properties)

not that it realy matters.

Thanks,

Dan

Andy McKay wrote:

 class A:
 _properties = [ {'a':'A', 'aa':'AA'}, ]

 class B(A):
 _properties = [ {'b':'B', 'bb':'BB'}, ]
 _properties = _properties + A._properties

 b = B()
 print b._properties

 Works for me.
 --
  Andy McKay, Developer, ActiveState
  http://www.ActiveState.com
  Programming for the People

 - Original Message -
 From: "Daniel Rusch" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 17, 2000 11:30 AM
 Subject: [Zope] getting base classes's (super class) _properties tuple

  Say I have a fully functional (and more importantly, working) Product
  will call A.
 
  I want to extend this Product's capabilities so I wish to derive another
 
  class from it, call it B.
 
  No problem,
 
  class B(A):
  .
 
  now in class B I want to add a new property.
 
  Is the a way of getting the base (super) class _properties tuple and
  just adding the new one to it. Since a tuple is an immutable object I
  can't do this:
  _properties=A._properties.append({'id':'RenderStandardHeader',
  'type':'int','mode':'w'})
 
  Any thoughts 
 
  DR
 
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 

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


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




Re: [Zope] getting base classes's (super class) _properties tuple

2000-08-17 Thread Andy McKay

Aargh isnt that annoying.

Gosh you are right im using lists of dictionaries... my Zope code is
correct, but that example is wrong. The example still works though...

--
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message -
From: "Daniel Rusch" [EMAIL PROTECTED]
To: "Andy McKay" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 12:19 PM
Subject: Re: [Zope] getting base classes's (super class) _properties tuple


 I can't believe it, but I didn't have the last comma ({'b':'B',
'bb':'BB'}, )
 and that's what was killing me .agh

 BTW, I noticed you are using lists of dictionaries instead of the
"standard"
 tuple of dictionaries. I don't  know if there are any consequences to
doing
 this.  Anyway, since yours are lists you should be able to to do this:

 class A:
 _properties = [ {'a':'A', 'aa':'AA'}, ]

 class B(A):
 _properties = [ {'b':'B', 'bb':'BB'}, ]
 _properties.append(A._properties)

 not that it realy matters.

 Thanks,

 Dan

 Andy McKay wrote:

  class A:
  _properties = [ {'a':'A', 'aa':'AA'}, ]
 
  class B(A):
  _properties = [ {'b':'B', 'bb':'BB'}, ]
  _properties = _properties + A._properties
 
  b = B()
  print b._properties
 
  Works for me.
  --
   Andy McKay, Developer, ActiveState
   http://www.ActiveState.com
   Programming for the People
 
  - Original Message -
  From: "Daniel Rusch" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, August 17, 2000 11:30 AM
  Subject: [Zope] getting base classes's (super class) _properties tuple
 
   Say I have a fully functional (and more importantly, working) Product
   will call A.
  
   I want to extend this Product's capabilities so I wish to derive
another
  
   class from it, call it B.
  
   No problem,
  
   class B(A):
   .
  
   now in class B I want to add a new property.
  
   Is the a way of getting the base (super) class _properties tuple and
   just adding the new one to it. Since a tuple is an immutable object I
   can't do this:
   _properties=A._properties.append({'id':'RenderStandardHeader',
   'type':'int','mode':'w'})
  
   Any thoughts 
  
   DR
  
  
   ___
   Zope maillist  -  [EMAIL PROTECTED]
   http://lists.zope.org/mailman/listinfo/zope
   **   No cross posts or HTML encoding!  **
   (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
  
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )


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



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




[Zope] Re: [Zope-dev] Cool, we like the . :-)

2000-08-17 Thread Jonothan Farr

What if an object id contains a period?
--jfarr

- Original Message - 
From: Chris Withers [EMAIL PROTECTED]
To: Steve Alexander [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 11:59 AM
Subject: [Zope-dev] Cool, we like the . :-)


 
 Steve Alexander wrote:
  I can't think of a nice alternative to mean dtml-/foo/bar/baz; "from
  the root, traverse as follows".
 
 dtml-.foo.bar.baz;
 
 not nice, btu I can't think of anything better :(
 
 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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re: [Zope-dev] Cool, we like the . :-)

2000-08-17 Thread Chris Withers

Jonothan Farr wrote:
 
 What if an object id contains a period?

Yeah, Steve noticed that too :S

What about dtml-:folder:object;

?

cheers,

Chris

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




[Zope] Zugriff auf Mootcourt Server

2000-08-17 Thread Marcus Schopen

Hallo,

der Zugriff auf den Mootcourt-Server von den Rechnern im HiWi-Raum funkt. nach 
Lokalisierung des Firewallproblems 
seit heute wieder.
Die User tom und bernhard koennen wieder uneingeschraenkt arbeiten.

Gruesse
Marcus

__

 (0   Marcus Schopen
 //\   Bielefeld, Germany
 V_/_
__


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




[Zope] Creating an object from within another

2000-08-17 Thread Daniel Rusch

So far so good,

Next hurdle, at least the problems have been cut down to hurdles from walls.

I have a folderish product say myFolder, in the manage_addMyFolder function I
want to create an object of my product B. so I do this:

def manage_addmyFolder(self, id, title='',
 REQUEST=None):
"""Add a new myFolder object with id *id*.
"""
ob=myFolder()
ob.id=id
ob.title=title
self._setObject(id, ob)
try: user=REQUEST['AUTHENTICATED_USER']
except: user=None
ob.manage_addB(id='index_html', title='') -- if I change this to
ob.manage_addDTMLDocument(id='index_html', title='') that works ?
...

I get the following error:

AttributeError: manage_addB



Any thoughts,

DR





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




Re: [Zope] Re: [Zope-dev] Cool, we like the . :-)

2000-08-17 Thread Shane Hathaway

Chris Withers wrote:
 
 Jonothan Farr wrote:
 
  What if an object id contains a period?
 
 Yeah, Steve noticed that too :S
 
 What about dtml-:folder:object;
 
 ?

That would probably work, but isn't kind of ugly?  Now we'd be forcing
people to realize that colons can be path separators.  Only Mac users
know this. :-)

Shane

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




Re: [Zope] Re: [Zope-dev] Cool, we like the . :-)

2000-08-17 Thread Zope

 Jonothan Farr wrote:
  What if an object id contains a period?
 Yeah, Steve noticed that too :S
 What about dtml-:folder:object;

How about dtml-zope.foo.bar; or dtml-app.foo.bar;

//Johan Carlsson

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




Re: [Zope] Creating an object from within another

2000-08-17 Thread Andy McKay

Not to sure there Im afraid. The obvious answer is the manage_addB doesnt
exist whereas manage_addDTMLDocument does.

--
 Andy McKay, Developer, ActiveState
 http://www.ActiveState.com
 Programming for the People


- Original Message -
From: "Daniel Rusch" [EMAIL PROTECTED]
To: "Daniel Rusch" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 17, 2000 1:39 PM
Subject: [Zope] Creating an object from within another


 So far so good,

 Next hurdle, at least the problems have been cut down to hurdles from
walls.

 I have a folderish product say myFolder, in the manage_addMyFolder
function I
 want to create an object of my product B. so I do this:

 def manage_addmyFolder(self, id, title='',
  REQUEST=None):
 """Add a new myFolder object with id *id*.
 """
 ob=myFolder()
 ob.id=id
 ob.title=title
 self._setObject(id, ob)
 try: user=REQUEST['AUTHENTICATED_USER']
 except: user=None
 ob.manage_addB(id='index_html', title='') -- if I change this to
 ob.manage_addDTMLDocument(id='index_html', title='') that works ?
 ...

 I get the following error:

 AttributeError: manage_addB



 Any thoughts,

 DR





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



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




  1   2   >