[Zope] Testing products: Testing all in one batch

2005-10-04 Thread Paul Winkler
Has anybody set up a batch job to test all installed Products
in a zope instance?

Seems like the only *useful* way I can get it to run is with a loop that
does "bin/zopectl test" once for each subdirectory of Products
that I actually care about, taking care to ignore problematic
third-party products.  Which is OK I guess, but I'd prefer not
to have to skip anything.

I think you *should* be able to simply do "./bin/zopectl test"
and that will run everything, but with real-world products this
seems to be a huge mess that spews a lot of red herring errors:

- Some otherwise excellent third-party products have tests with
  dependencies that the product itself does not have, and which
  I do not want to install. (I will contact the author(s) privately.)

- Some third-party products (e.g. CMF) ship with tests that just plain
  fail.
  If I install CMF 1.4.8 and nothing else, and run ./bin/zopectl test,
  I get 1 error and 1 failure.  This is a bit surprising from a stable
  release, I'd expect not to get any... will forward those to the CMF
  list and follow up there, if there are not already issues filed for
  these.

- Some of my own Product tests run fine in isolation but break when
  run alongside other installed product tests.
  That's its own issue which I will take up in a separate thread.

I guess my overall questions are

- Does this jibe with others' experience?

- Is there a better (or best) way to run all my Product tests?

- *Should* we expect that ./bin/zopectl test will run all installed
Products tests, and if so, what can we do as a community to get
authors to fix their products?

p.s. you may notice a series of messages from me re. testing...
i'm trying to sort out a bunch of issues at once, and want to
try to keep the issues separate.

-- 
Paul Winkler
http://www.slinkp.com



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


Re: [Zope] Accessing CURRENT property

2005-10-04 Thread Peter Bengtsson
2005/10/4, Chris Withers <[EMAIL PROTECTED]>:
> Alex Renier wrote:
> > Hello,
> > if I have a folder1 in a folder2 and my folder 1 has a
> > certain property.  If I want to know if folder2 has
> > the property I use hasattr() method on folder2,
>
> Just a note in passing, hasattr is very dangerous to use in a Zope 2
> context...
>
Not sure what it's called in Page Templates or Python Scripts but in
DTML it's called careful_hasattr() which wraps hasattr() in a
restricted context.
I'm sure TALES and Python Scripts too.

> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
> - http://www.simplistix.co.uk
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Testing products: pychecker running wild in the streets!

2005-10-04 Thread Paul Winkler
Hi folks,

For the first time I'm playing with the "-c" argument to test.py.
Thought it would be nice to get some pychecker output on the Products
I'm working on.

Is there any way to reduce the scope of what pychecker checks?
Or does it inevitably walk through the whole import tree?
Has anybody actually found the -c option useful?
Any tips on using pychecker effectively for product development?

Aside from the fact that it's bothersome to deal with the output,
because pychecker  wants to spew commentary on every little wart in the
entire Zope codebase (2.7.7 in my case)- and it finds no shortage of them
 I guess I could filter the output with grep
But regardless of all that, there's a showstopper - before it even
gets to my products, pychecker barfs on DBTab (which must come
from somewhere pretty deep in there, as my code doesn't use it)...
like so:

Traceback (most recent call last):
  File "/zope/ZopeSoftwareHome/lib/python/Zope/Startup/datatypes.py", line
106,
in importable_name
package = __import__(n, g, g, component)
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/DBTab/ClassFactories.py", line
18, in
?
import OFS.Uninstalled
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/OFS/Uninstalled.py", line 16, in ?
import  SimpleItem, Globals, Acquisition
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/OFS/SimpleItem.py", line 23, in ?
import re, sys, Globals, App.Management, Acquisition, App.Undo
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/Globals.py", line 23, in ?
import Acquisition, ComputedAttribute, App.PersistentExtra, os
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/App/PersistentExtra.py", line
14, in ?

from class_init import default__class_init__
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/App/class_init.py", line 14, in ?
from AccessControl.PermissionRole import PermissionRole
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/AccessControl/__init__.py", line
16, i
n ?
import DTML
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/AccessControl/DTML.py", line 18,
in ?
from DocumentTemplate import DT_Util
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/DocumentTemplate/__init__.py",
line 22
, in ?
from DocumentTemplate import String, File, HTML, HTMLDefault, HTMLFile
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File
"/zope/ZopeSoftwareHome/lib/python/DocumentTemplate/DocumentTemplate.py",
 line 112, in ?
from DT_String import String, File
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/DocumentTemplate/DT_String.py",
line 1
7, in ?
from DT_Util import ParseError, InstanceDict, TemplateDict,
render_blocks, s
tr
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/zope/ZopeSoftwareHome/lib/python/DocumentTemplate/DT_Util.py",
line 42,
 in ?
from cDocumentTemplate import InstanceDict, TemplateDict, \
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
  File "/usr/local/lib/python2.3/site-packages/pychecker/checker.py", line
767,
in __import__
pymodule = _orig__import__(name, globals, locals, fromlist)
ImportError: No module named html_quote


-- 
Paul Winkler
http://www.slinkp.com



__

RE: [Zope] ZEO client authentication

2005-10-04 Thread Mika, David P (Research)
Thanks!  Works great.

I found that you can generate the encrypted password with 
Lib/python/ZEO/zeopasswd.py

I wish there was a better solution than having the cleartext password in the 
zope.conf file
Dave

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Sascha
Ottolski
Sent: Monday, October 03, 2005 11:40 AM
To: zope@zope.org
Subject: Re: [Zope] ZEO client authentication


Am Montag, 3. Oktober 2005 14:44 schrieb Mika, David P (Research):
> I see that ZEO supports a simple digest authenitcation of clients and that
> this is set in the zeo's config file with the keys:
> authentication-protocol, authentication-database and authentication-realm.
>
> Further, I can see that a client can connect using e.g. ZEO.ClientStorage
> with arguments for a userid & password (set in the ZEO authentication
> database).  However, how does one configure Zope (as a client to the ZEO
> server) to use this authentication?  I see nothing in the Zope config file.
>  Somehow Zope must be able to pass a valid userid and password in the
> authentication database to ZEO.
>
> Dave

Hi Dave,

this might help, although it's not written by me so I'm not 100% sure that 
I've picked up everything:

small patch to lib/python/ZODB:

--- config.py(revision 37730)
+++ config.py(working copy)
@@ -150,7 +150,10 @@
 max_disconnect_poll=self.config.max_disconnect_poll,
 wait=self.config.wait,
 read_only=self.config.read_only,
-read_only_fallback=self.config.read_only_fallback)
+read_only_fallback=self.config.read_only_fallback,
+username=self.config.username,
+password=self.config.password,
+realm=self.config.realm)

 class BDBStorage(BaseConfig):

Index: component.xml
===
--- component.xml(revision 37730)
+++ component.xml(working copy)
@@ -132,6 +132,16 @@
 read_only_fallback should be true.
   
 
+
+  
+The authentication username of the server.
+  
+
+
+  
+The authentication password of the server.
+  
+
 
   
 The authentication realm of the server.  Some authentication


something like this in your zeo.conf  section:


  ...
  authentication-protocol digest
  authentication-database $INSTANCE/etc/auth.db
  authentication-realm your_realm
  ...


obviously, a username/password in $INSTANCE/etc/auth.db (ZEO instance, that 
is):

$ cat /mnt/zope/ZEOHome/etc/auth.db
realm your_realm
your_username: your_crypted_password

and something like this in your zope.conf:


  mount-point /
  cache-size 1
  
server localhost:1234
username your_username
password your_cleartext_password
...
...
  


now, I'm not sure how to create the encrypted password, I guess zpasswd.py 
will help.


Good luck,

Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Mysql 5? Just curious.

2005-10-04 Thread Greg Fischer
This is totally unimportant, but I was just curious to know if anyone is running Mysql 5 on Zope right now.
-- Greg Fischer1st Byte Solutionshttp://www.1stbyte.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] python: calling DTML-methods without quoting

2005-10-04 Thread Chris Withers

Chris wrote:

I hope this is not a FAQ, but I looked for some info to no avail.


And my answer to this FAQ, as always, is "use ZPT".

If I call a DTML-Method from an other Method (e.g. ), 
 HTML entities are not converted.


This is calling and rendering whatever someDTML is...

However if I call it from python (e.g.  
the entities are html_quoted.


This is likely inserting a python repr of whatever somePath.someDTML 
resolves too...


This changed with Zope 2.7.x (?). Before that DTMLMethods were not 
quoted when called from python.


Where are you calling one from python?

I know the easy workaround is to dtml-with to the namespace of the 
object and call it the zope-way.


Huh?

I have a customer with several large applications which run on an old 
Zope only for the described reason. The applications relay heavily on 
calling DTML-Methods to include pieces of HTML, JavaScript, etc. 
Changing the old code would be an enormous effort.


...but likely worth it in the long run ;-)

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] how to use zeo under windows?

2005-10-04 Thread Chris Withers


Robert Rottermann wrote:

How do I best run zeo under windows ?
When I use mkzeoctrl.py as I do under linux, only a runzeo file is generated 
which can not be used under windows.


Sheesh, they're not that hard to read you know...

Anyway, here's the contents of the runzeo.bat I use:

# ZEO storage server start script

set ZOPE_HOME=C:\Zope\2.7.5
set PYTHON=%ZOPE_HOME%\bin\python.exe
set CONFIG_FILE=C:\Zope\MyStorage\etc\zeo.conf

set ZODB3_HOME=%ZOPE_HOME%\lib\python
set PYTHONPATH=%ZODB3_HOME%

set RUNZEO=%ZODB3_HOME%\ZEO\runzeo.py

%PYTHON% %RUNZEO% -C %CONFIG_FILE% %1 %2 %3 %4 %5

set RUNZEO=
set PYTHONPATH=
set ZODB3_HOME=
set CONFIG_FILE=
set PYTHON=
set ZOPE_HOME=

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Accessing CURRENT property

2005-10-04 Thread Chris Withers

Alex Renier wrote:

Hello,
if I have a folder1 in a folder2 and my folder 1 has a
certain property.  If I want to know if folder2 has
the property I use hasattr() method on folder2, 


Just a note in passing, hasattr is very dangerous to use in a Zope 2 
context...


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Presentations Available

2005-10-04 Thread Chris Withers

Nick Davis wrote:
Thanks for posting this, Chris. Very interesting. I would've liked to 
have been at the conferences where you gave these. ;-)


With bricks or beer? ;-)


I think you make some good points.


thanks!

My main gripe with Plone is its such a moving target. Hopefully as it 
matures this will get better.


...2+ years should have already produced some maturity, no?

In any case, how come everyone's focussing on the Plone talk?
Personally, the one on unit testing and the other one on Stepper and 
other cool Zope toys is much more important IMNSHO...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Presentations Available

2005-10-04 Thread Chris Withers

Chris Withers wrote:
I finally got around to putting all my presentations online from the 
conferences over the last few years.


The can now all be found at:

http://www.simplistix.co.uk/presentations

Have fun and let me know what you think!


OK, thanks for the feedback, I'll try and get PDF version of all the 
presentations up too, but bear in mind it's taken me 2 years to get this 
far, you may be waiting "some time" ;-)


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZEO client authentication

2005-10-04 Thread Chris Withers

Mika, David P (Research) wrote:

I see that ZEO supports a simple digest authenitcation of clients and that this 
is set in the zeo's config file with the keys: authentication-protocol, 
authentication-database and authentication-realm.

Further, I can see that a client can connect using e.g. ZEO.ClientStorage with 
arguments for a userid & password (set in the ZEO authentication database).  
However, how does one configure Zope (as a client to the ZEO server) to use this 
authentication?  I see nothing in the Zope config file.  Somehow Zope must be able 
to pass a valid userid and password in the authentication database to ZEO.


The best place to ask these questions is the zodb-dev@zope.org mailing 
list...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] python: calling DTML-methods without quoting

2005-10-04 Thread Peter Bengtsson
2005/10/4, Chris <[EMAIL PROTECTED]>:
> Hi Peter,
>
> >>
> >>   
> >>
> >
> > Now I'm very confused. What the heck is "someDTML" and what is "foo".
> > I thought "someDTML" was a DTML Method/Document. Then what is foo?
>
> Sorry, my fault. This should read
> 
> 
> 
>
> > I could be wrong but it seems your DTML usage is flawed. Then yes,
> > you'll have to write some regular expression scripts that recodes them
> > to call templates the correct way.
>
> This would be no problem. However I need zope to do this automatically
> so I don't have to change the dtml-var calls in the customer's code. So
> my thought is to alter the __call__ method of DTMLMethod.py which is
> kind of ugly in case I want to update Zope later on.
>

Like I said, Good luck!
Wouldn't it be easier to change the DTML source inside the customers zodb?


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] python: calling DTML-methods without quoting

2005-10-04 Thread Chris

Hi Peter,



  



Now I'm very confused. What the heck is "someDTML" and what is "foo".
I thought "someDTML" was a DTML Method/Document. Then what is foo?


Sorry, my fault. This should read

   



I could be wrong but it seems your DTML usage is flawed. Then yes,
you'll have to write some regular expression scripts that recodes them
to call templates the correct way.


This would be no problem. However I need zope to do this automatically 
so I don't have to change the dtml-var calls in the customer's code. So 
my thought is to alter the __call__ method of DTMLMethod.py which is 
kind of ugly in case I want to update Zope later on.



PS. Do you need convincing that Page Templates are better than DTML
for HTML stuff?


I KNOW that :-) I don't use DTML myself. As I said I try to get a 
customer's stuff run on a curent version of zope. I would love to clean 
up his stuff and convert is to tal.


Regards
Chris
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] python: calling DTML-methods without quoting

2005-10-04 Thread Chris

Hi Peter,

sorry, I did not explain this clearly:

someDTML looks like this:
Hello World


Calling  returns the html_quoted string
representation:
Hello World



  

returns
Hello World
2005/10/04 17:29:35.199 GMT+2

As far as I remember, the "old" Zope versions did not html_quote the
html entities. This is what I need in order to have the old applications
run without major "search and replace".

Regards,
Chris

Peter Bengtsson wrote:

No.
 returns a "pointer" to that object
called someDTML. Not it's rendered content.
 does the same as  (sort of)

There's a big difference between

and


Either I didn't understand your question or this answers it for you.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] python: calling DTML-methods without quoting

2005-10-04 Thread Peter Bengtsson
No.
 returns a "pointer" to that object
called someDTML. Not it's rendered content.
 does the same as  (sort of)

There's a big difference between

and


Either I didn't understand your question or this answers it for you.


2005/10/4, Chris <[EMAIL PROTECTED]>:
> Hi,
>
> I hope this is not a FAQ, but I looked for some info to no avail.
>
> If I call a DTML-Method from an other Method (e.g. ),
>   HTML entities are not converted.
>
> However if I call it from python (e.g. 
> the entities are html_quoted.
>
> This changed with Zope 2.7.x (?). Before that DTMLMethods were not
> quoted when called from python.
>
> I know the easy workaround is to dtml-with to the namespace of the
> object and call it the zope-way.
>
> I have a customer with several large applications which run on an old
> Zope only for the described reason. The applications relay heavily on
> calling DTML-Methods to include pieces of HTML, JavaScript, etc.
> Changing the old code would be an enormous effort.
>
> Is there a way to patch zope to show the old behavior?
>
> Regards
> Chris
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] python: calling DTML-methods without quoting

2005-10-04 Thread Chris

Hi,

I hope this is not a FAQ, but I looked for some info to no avail.

If I call a DTML-Method from an other Method (e.g. ), 
 HTML entities are not converted.


However if I call it from python (e.g.  
the entities are html_quoted.


This changed with Zope 2.7.x (?). Before that DTMLMethods were not 
quoted when called from python.


I know the easy workaround is to dtml-with to the namespace of the 
object and call it the zope-way.


I have a customer with several large applications which run on an old 
Zope only for the described reason. The applications relay heavily on 
calling DTML-Methods to include pieces of HTML, JavaScript, etc. 
Changing the old code would be an enormous effort.


Is there a way to patch zope to show the old behavior?

Regards
Chris
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Presentations Available

2005-10-04 Thread Nick Davis
Thanks for posting this, Chris. Very interesting. I would've liked to 
have been at the conferences where you gave these. ;-)


I think you make some good points.

My main gripe with Plone is its such a moving target. Hopefully as it 
matures this will get better.





___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Are signs not supported as password characters?

2005-10-04 Thread Lennart Regebro
On 10/3/05, OGURA Toshiyuki <[EMAIL PROTECTED]> wrote:
> Sorry for the typo.
>
> "Is signs ..." should be "Are signs ..."
>
> Also, this seems to occur if *any* characters of Manager's password
> are signs.
>
> OGURA Toshiyuki wrote:
> > Hello.
> >
> > I installed Zope 3.1.0 final on my Linux system.
> > I found that it seems that Zope fails to start if you specify sign
> > characters (not letters or numbers) as Manager's password.
> > Is this correct?

No, I'm pretty sure that's not correct. Maybe you could tell us which
signs you are talking about?

And also, I think the zope3-users list is a better place to ask zope3
questions than the zope list.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] phpBB conversion to Zope/Plone discussion product?

2005-10-04 Thread Peter Bengtsson
2005/10/4, Reinoud van Leeuwen <[EMAIL PROTECTED]>:
> Hi,
>
> In the process of converting old systems to our new Plone intranet, I have
> come across an old phpBB forum.
>
> Has anyone converted a board like this to Ploneboard or another Zope or
> Plone based discussion system?

Don't know about conversion but zforums looks pretty hot.
http://www.zforum.org/

> Of course there will be some differences in possibilities, but converting
> the content would be a nice step.
>
> --
> __
> "Nothing is as subjective as reality"
> Reinoud van Leeuwen[EMAIL PROTECTED]
> http://www.xs4all.nl/~reinoud
> __
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] phpBB conversion to Zope/Plone discussion product?

2005-10-04 Thread Reinoud van Leeuwen
Hi,

In the process of converting old systems to our new Plone intranet, I have 
come across an old phpBB forum.

Has anyone converted a board like this to Ploneboard or another Zope or 
Plone based discussion system?
Of course there will be some differences in possibilities, but converting 
the content would be a nice step.

-- 
__
"Nothing is as subjective as reality"
Reinoud van Leeuwen[EMAIL PROTECTED]
http://www.xs4all.nl/~reinoud
__
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] how to use zeo under windows?

2005-10-04 Thread Robert Rottermann
How do I best run zeo under windows ?
When I use mkzeoctrl.py as I do under linux, only a runzeo file is generated 
which can not be used under windows.

thanks
robert
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Accessing CURRENT property

2005-10-04 Thread Peter Bengtsson
http://zopelabs.com/cookbook/1002891491

2005/10/4, Alex Renier <[EMAIL PROTECTED]>:
> Hello,
> if I have a folder1 in a folder2 and my folder 1 has a
> certain property.  If I want to know if folder2 has
> the property I use hasattr() method on folder2, but it
> returns true because it looks down the hierarchy and
> sees the property in folder1.  is there a way to check
> for the property in folder2 ONLY without checking the
> ancestor folders?.
>
> Thanks!
>
>
>
> __
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Presentations Available

2005-10-04 Thread Duncan Booth
David H wrote:

> I saw that in a few google hits but ... I figured that if a fair 
> population wants to view the presentations then the files should be in a 
> universal format - like pdf or rtf. 
> Its an interesting question:  how many people who just wish to peruse 
> the files will feel compelled to google and download new apps just to be 
> able to read them?
> 
Why download anything? You can do the conversion online at
http://cdsconv.cern.ch/index.py/Simple?s_id=sxi

I agree with you in general though that uploading them as pdf would have 
been a good idea especially since, unlike certain other office 
applications, the conversion is a built-in feature of OpenOffice.

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


Re: [Zope] Presentations Available

2005-10-04 Thread Akbar
On 10/4/05, David Cake <[EMAIL PROTECTED]> wrote:
>
> We don't all run presentation software, either. If you just
> want to review a presentation rather than create/edit it, a format
> like PDF can be a better choice, and that applies regardless of how
> you feel about Microsoft.
> Effectively, what you are saying to many people is 'rather
> than use a viewer app you already have, to view this you will need to
> download a multi-megabyte office suit just to look at it'. If you
> don't see that as a problem, well, its still a problem.
> Cheers
> David

https://oooview.dev.java.net/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Presentations Available

2005-10-04 Thread David Cake

At 8:11 PM -0700 3/10/05, Bill Campbell wrote:

On Mon, Oct 03, 2005, David H wrote:


   Thanks Bill,
   I saw that in a few google hits but ... I figured that if a fair
   population wants to view the presentations then the files should be in
   a universal format - like pdf or rtf.



   Its an interesting question:  how many people who just wish to peruse
   the files will feel compelled to google and download new apps just to
   be able to read them?


Given that I don't run the Microsoft virus, Windows, on anything, have
OpenOffice.org on all our Linux and OS X systems, and that OpenOffice.org
software is freely available, I don't see that it's a problem.


	We don't all run presentation software, either. If you just 
want to review a presentation rather than create/edit it, a format 
like PDF can be a better choice, and that applies regardless of how 
you feel about Microsoft.
	Effectively, what you are saying to many people is 'rather 
than use a viewer app you already have, to view this you will need to 
download a multi-megabyte office suit just to look at it'. If you 
don't see that as a problem, well, its still a problem.

Cheers
David
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Aquisition, UserFolder and security

2005-10-04 Thread bruno modulix
Florent Guillaume wrote:
> bruno modulix wrote:
> 
>> Dieter, I didn't misunderstood your proposed solution. But some users
>> exist in different CPMs with different roles in each CPM. So - unless
>> I'm totally at lost with how Zope's security works - if User1 has role
>> RoleWithMuchPrivileges in Cpm1 and role RoleWithFewPrivileges in Cpm2,
>> he could gain RoleWithMuchPrivileges in Cpm2 just by using faked url
>> cpm1/cpm2/whatever_he_should_not_access_here. Worse, anyone existing in
>> any CPM could gain access to any other CPM just by faking url.
> 
> 
> As Tres mentionned, that should not be possible, as it's contrary to the
> Zope Security Policy.

As I mentionned, I may *also* be completely at lost with the inners of
Zope's escurity policy :-/

> Can you reproduce it within a blank CPS instance using standard CPS
> products? If yes, could you explain the steps to reproduce it, and the
> versions of CPS, CMF, Zope and python you use?

What I observed is that, given 2 siblings CPS (cpsA and cpsB) instances
with LDAPUserGroupsFolder, a user existing only in cpsA, once
authenticated in cpsA, is still viewed as authenticated when accessing
cpsB thru the cpsA/cpsb url. I don't have much time right now to
investigate further, but I'll do ASAP and let you know if I find
anything strange.


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


Re: [Zope] Presentations Available

2005-10-04 Thread Jens Vagelpohl


On 4 Oct 2005, at 04:11, Bill Campbell wrote:

Given that I don't run the Microsoft virus, Windows, on anything, have
OpenOffice.org on all our Linux and OS X systems, and that  
OpenOffice.org

software is freely available, I don't see that it's a problem.


Odd reasoning. I hate to inform you, but not everyone is like you. I  
second David's point. Regardless of operating system or office-style  
software in use, I personally refuse to download and install a huge  
office suite just to view some files.


jens

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: AW: [Zope] Zope Debugger lets WingDbg fail to connect to client

2005-10-04 Thread Chris Withers

Hi Peter,

Frey, Peter wrote:
When the WingIDE Zope-Product WingDbg is installed (and working), 


Does WingDbg ship with its source code? 


yes, it does, at least in the professional version
I am not sure about the light one


Any chance I could get you to email me that off-list so I can see about 
making the two compatible?


If so, I'd be interested to see 
it to see how the two products are treading on each other...


the WingDbg uses a monkey patch mechanism to hook into debugging Python Scripts
namly it overwrites

PythonScript.__init__
PythonScript._compile
PythonScript.write
PythonScript.read

and, if FSPythonScript is available, also:

FSPythonScript._createZODBClone
FSPythonScript._write


Ah, right, and you'll see that zdb monkey patches:

PythonScript._exec
PythonScript._compiler
FSPythonScript._write

To debug this, what I'd suggest putting:

import pdb; pdb.set_trace()

(NB: that's pdb, NOT zdb)

...somewhere such that you can step through and see which monkeypath 
methods are getting called. Print statements may also work ;-)


Once we've got that figured out, I can see about getting zdb to work 
around Wing's stuff, if it's there...


The problem is that I don't use Wing and so can't try this out...


I assume that your product may be more flexible in respect to 
non-filesystem-based PythonScripts
but I have not succeeded testing it as I ran into a AttributeError "Zdb instance has 
no attribute '_wait_for_mainpyfile'"


Ah, now that sounds like another clue. This might well be the problem 
with Wing, can you give me the full traceback from when you saw this?



(I am now not sure if this was due to the fact that I have the WingDbg 
installed, or if it was because I was attempting to debug
filesystem based product code while Zope was not yet fully initialized, I had to find the cause for a problem with Zope starting 
in Debug Mode with debug-mode in the config set to off)


This is likely a wing problem...


when I find time and see more clearer why Zope Debugger and WingDbg fail 
together (maybe it was configuration specific ...)
I will let you know and ask Stephan/John from Wingware if the problem is known.


Well, there IS a known problem: the one you're reporting ;-)
Would be good to knock heads wit hthe Wingware guys and see if we can 
come up with a way to make the products compatible...



WingDbg failes to connect back to the WingIDE client, no error message, the 
client just does not get contacted by the server


Well, when did you see the _wait_for_mainpyfile error?

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )