Re: [Zope] Efficiency of Script (Python) versus External Method

2006-06-16 Thread Chris Withers
Andrew Hedges wrote: Is there a difference in the efficiency of a function as a Script (Python) Zope object versus an External Method? The use case is that I need to run a fairly simple function (an implementation of the Levenshtein distance algorithm) over a result set in the range of 30-40k

[Zope] transaction.begin() ??

2006-06-16 Thread robert rottermann
in a unittest I use transaction.begin() as follows: import transaction transaction.get().begin() I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin' when I look at the code I am unsure whether transaction should have a begin method. If it does not

Re: [Zope] transaction.begin() ??

2006-06-16 Thread Andreas Jung
--On 16. Juni 2006 10:03:23 +0200 robert rottermann [EMAIL PROTECTED] wrote: in a unittest I use transaction.begin() as follows: import transaction transaction.get().begin() I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin' when I look at the

Re: [Zope] transaction.begin() ??

2006-06-16 Thread robert rottermann
Andreas Jung wrote: --On 16. Juni 2006 10:03:23 +0200 robert rottermann [EMAIL PROTECTED] wrote: in a unittest I use transaction.begin() as follows: import transaction transaction.get().begin() I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin'

Re: [Zope] transaction.begin() ??

2006-06-16 Thread Andreas Jung
--On 16. Juni 2006 10:17:18 +0200 robert rottermann [EMAIL PROTECTED] wrote: Andreas Jung wrote: --On 16. Juni 2006 10:03:23 +0200 robert rottermann [EMAIL PROTECTED] wrote: in a unittest I use transaction.begin() as follows: import transaction transaction.get().begin() I then get

Re: [Zope] Render DTML inslide ZPT slot

2006-06-16 Thread thomas desvenain
and how can we transfer the namespace of the current zpt doing : div tal:replace=structure context/some_dtml_method / as we do in dtml writing : dtml-var some_dtml_method ? 2006/6/15, Dieter Maurer [EMAIL PROTECTED]: Jonathan Bowlas wrote at 2006-6-15 14:05 +0100: ... Is it possible to

[Zope] Re: Render DTML inslide ZPT slot

2006-06-16 Thread Max M
thomas desvenain wrote: and how can we transfer the namespace of the current zpt doing : div tal:replace=structure context/some_dtml_method / as we do in dtml writing : dtml-var some_dtml_method If it doesn't automatically you can most likely just write: div tal:replace=structure

[Zope] SSL Redirect for CookieCrumbler

2006-06-16 Thread Josef Meile
Dear Zopers I need to redirect all my http requests to the login_form of the CookieCrumble to https, so, I wrote this rule in apache: RewriteRule ^/login/login_form(.*) https://server/login/login_form$1 [NE,L] It authenticates me through ssl, but then it cames back to http. I saw that the

[Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Gaute Amundsen
This gave me such a headache today, that I thought I ought to mention it. All my pages normally have a content-type of ISO-8859-1 I have not spent much thought on this, it has just worked nicely like that. Today I had a page that called a python script, that even when I made it return an empty

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Andreas Jung
--On 16. Juni 2006 13:05:09 +0200 Gaute Amundsen [EMAIL PROTECTED] wrote: item.manage_changeProperties({'title':'Hustype'}) gives utf-8. This makes less sense. You're passing an ASCII string which has the same representation in UTF-8..so why should this be a utf-8 string?

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Gaute Amundsen
On Friday 16 June 2006 13:14, Andreas Jung wrote: --On 16. Juni 2006 13:05:09 +0200 Gaute Amundsen [EMAIL PROTECTED] wrote: item.manage_changeProperties({'title':'Hustype'}) gives utf-8. This makes less sense. You're passing an ASCII string which has the same representation in UTF-8..so

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Andreas Jung
--On 16. Juni 2006 13:31:35 +0200 Gaute Amundsen [EMAIL PROTECTED] wrote: On Friday 16 June 2006 13:14, Andreas Jung wrote: --On 16. Juni 2006 13:05:09 +0200 Gaute Amundsen [EMAIL PROTECTED] wrote: item.manage_changeProperties({'title':'Hustype'}) gives utf-8. This makes less sense.

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Tino Wildenhain
Gaute Amundsen schrieb: This gave me such a headache today, that I thought I ought to mention it. All my pages normally have a content-type of ISO-8859-1 I have not spent much thought on this, it has just worked nicely like that. Today I had a page that called a python script, that even when I

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Andreas Jung
--On 16. Juni 2006 13:39:03 +0200 Tino Wildenhain [EMAIL PROTECTED] wrote: item.manage_changeProperties({'title':'Hustype'}) gives utf-8. item.manage_changeProperties(title='Hustype') leaves ISO-8859-1 intact. WTF is that? My guess would be the dict-argument is used in

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Andreas Jung
--On 16. Juni 2006 13:42:40 +0200 Andreas Jung [EMAIL PROTECTED] wrote: --On 16. Juni 2006 13:39:03 +0200 Tino Wildenhain [EMAIL PROTECTED] wrote: item.manage_changeProperties({'title':'Hustype'}) gives utf-8. item.manage_changeProperties(title='Hustype') leaves

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Philip Kilner
Hi Andreas, Andreas Jung wrote: 'Hustype' is pure ASCII...this will *always* have the same encoding in almost all encodings (except in Klingon). [klingon] ghaH ghItlhta' Daq [ASCII] ;-) -- Regards, PhilK Human language continually changes, innit. - Stephen Juan

[Zope] DeadlockDebugger revisited

2006-06-16 Thread Matthew X. Economou
I thought a recent operating system upgrade (FreeBSD 5.4 to 6.1) fixed my problems with Zope. Unfortunately, once I re-compiled Python et al (to remove dependencies on the old libraries), my problems with Zope deadlocking recurred. I tried to use a combination of tools to try to discover the

[Zope] Zope Recordset Object

2006-06-16 Thread Alric Aneron
Hello, I have a ZSQL Method, which is called by my python script. However, I am curious as to what type of object is returned when that call is made. It's some sort of a recordset (or resultset) object that behaves like a list...it doesn't seem to be a dictionary object though, but I can't find

Re: [Zope] Zope Recordset Object

2006-06-16 Thread Andrew Milton
+---[ Alric Aneron ]-- | Hello, | I have a ZSQL Method, which is called by my python | script. | However, I am curious as to what type of object is | returned when that call is made. | It's some sort of a recordset (or resultset) object | that behaves like a list...it

Re: [Zope] Zope Recordset Object

2006-06-16 Thread Jonathan
- Original Message - From: Alric Aneron [EMAIL PROTECTED] To: zope@zope.org Sent: Friday, June 16, 2006 10:19 AM Subject: [Zope] Zope Recordset Object Hello, I have a ZSQL Method, which is called by my python script. However, I am curious as to what type of object is returned when

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Gaute Amundsen
On Friday 16 June 2006 13:39, Tino Wildenhain wrote: Gaute Amundsen schrieb: snip item.manage_changeProperties({'title':'Hustype'}) gives utf-8. item.manage_changeProperties(title='Hustype') leaves ISO-8859-1 intact. WTF is that? My guess would be the dict-argument

Re: [Zope] Zope Recordset Object

2006-06-16 Thread jpenny
http://mail.zope.org/pipermail/zope-dev/1999-September/001414.html The only auxiliary structure I ever use is names, i.e. n2i = {} res = container.foo_zsql() nms = res.names() for i in range(len(nms)): n2i[nms[i]] = i Then I can address by name as in res[i][n2i['column_name']] jim Hello,

[Zope] Re: SSL Redirect for CookieCrumbler

2006-06-16 Thread Josef Meile
I need to redirect all my http requests to the login_form of the CookieCrumble to https, so, I wrote this rule in apache: RewriteRule ^/login/login_form(.*) https://server/login/login_form$1 [NE,L] It authenticates me through ssl, but then it cames back to http. I saw that the problem is that

Re: [Zope] Re: Render DTML inslide ZPT slot

2006-06-16 Thread Dieter Maurer
Max M wrote at 2006-6-16 11:01 +0200: thomas desvenain wrote: and how can we transfer the namespace of the current zpt doing : div tal:replace=structure context/some_dtml_method / as we do in dtml writing : dtml-var some_dtml_method If it doesn't automatically you can most likely just

Re: [Zope] transaction.begin() ??

2006-06-16 Thread Dieter Maurer
robert rottermann wrote at 2006-6-16 10:03 +0200: in a unittest I use transaction.begin() as follows: import transaction transaction.get().begin() I then get the following error: AttributeError: 'Transaction' object has no attribute 'begin' when I look at the code I am unsure whether

Re: [Zope] SSL Redirect for CookieCrumbler

2006-06-16 Thread Dieter Maurer
Josef Meile wrote at 2006-6-16 12:54 +0200: I need to redirect all my http requests to the login_form of the CookieCrumble to https, so, I wrote this rule in apache: RewriteRule ^/login/login_form(.*) https://server/login/login_form$1 [NE,L] It authenticates me through ssl, but then it cames

Re: [Zope] manage_changeProperties has strange side effect on response Content-Type.

2006-06-16 Thread Dieter Maurer
Gaute Amundsen wrote at 2006-6-16 13:05 +0200: All my pages normally have a content-type of ISO-8859-1 I have not spent much thought on this, it has just worked nicely like that. Today I had a page that called a python script, that even when I made it return an empty string, changed the

Re: [Zope] DeadlockDebugger revisited

2006-06-16 Thread Dieter Maurer
Matthew X. Economou wrote at 2006-6-16 09:10 -0400: I thought a recent operating system upgrade (FreeBSD 5.4 to 6.1) fixed my problems with Zope. Unfortunately, once I re-compiled Python et al (to remove dependencies on the old libraries), my problems with Zope deadlocking recurred. I tried to

[Zope] acl_users in MySQL

2006-06-16 Thread Luiz Fernando B. Ribeiro
Hello, I've been searching for a solution on how to integrate my actual database of users (in MySQL) with the Zope authentications machinery. I found some old instructions (2001) using LoginManager and zPatterns but I would like to hear from you about the alternatives. Currently I'm using

Re: [Zope] acl_users in MySQL

2006-06-16 Thread Cliff Ford
Suggestion: have a look at exUserFolder. It has a MySQL Authentication Source. The minimum requirement is a table with Username, Password and Roles fields. Cliff Luiz Fernando B. Ribeiro wrote: Hello, I've been searching for a solution on how to integrate my actual database of users (in

[Zope] setting up fast_cgi

2006-06-16 Thread Adinda Praditya
Hi,I just installed FastCGI-2.4.0-12 and add manually my mod_fastcgi.conf then restart apache. I got this error# /etc/init.d/apache2 restartSyntax error on line 1 of /etc/apache2/conf.d/mod_fastcgi.conf: Invalid command 'FastCgiIpcDir', perhaps misspelled or defined by amodule not included in the

[Zope-dev] Re: You can always document...

2006-06-16 Thread Chris Withers
yuppie wrote: # Support old-style product metadata. Older products may # define attributes to name their permissions, meta_types, # constructors, etc. [followed by the code that interprets the 'methods' attribute] So 'methods' is BBB code for constructors. That depends on how

Re: [Zope-dev] Re: Re: OFS.Application deprecations for Zope 2.10

2006-06-16 Thread Chris Withers
Chris McDonough wrote: An example of cruft removal that is worthwhile: the help system code has stupid side effects (it writes to an invisible catalog in the ZODB *at startup!*), and people have an alternate way of viewing the help via the filesystem. Apparently nobody actually looks at the

Re: [Zope-dev] Re: Time-based releases a good idea?

2006-06-16 Thread Chris Withers
Tres Seaver wrote: Unit test coverate for custom products is actually quite good. The problems are nearly always to do with third party products, many of which have been in useful stable mode since long before either deprectaions or ubiquitous unit testing were part of our community's

[Zope-dev] Re: You can always document...

2006-06-16 Thread yuppie
Hi Chris! Chris Withers wrote: yuppie wrote: # Support old-style product metadata. Older products may # define attributes to name their permissions, meta_types, # constructors, etc. [followed by the code that interprets the 'methods' attribute] So 'methods' is BBB code for

[Zope-dev] Stable / Development branches?

2006-06-16 Thread Chris Withers
Martijn Faassen wrote: Chris Withers wrote: [snip] Personally, I find non-time-based releases a much nicer prospect: you only need to move to the next major version when it's ready and because it contains big new features you really want. Who is going to develop these big features? What's

[Zope-dev] Re: Stable / Development branches?

2006-06-16 Thread Andreas Jung
--On 16. Juni 2006 09:12:36 +0100 Chris Withers [EMAIL PROTECTED] wrote: Even numbered releases are feature add releases: 2.12.0 - okay, lets start adding features 2.12.1 - whoops, fixed bug x 2.12.2 - added feature y 2.12.3 - whoops, fixed bug z 2.12.0 - added feature z 2.14.1 - whoops,

Re: [Zope-dev] Re: Stable / Development branches?

2006-06-16 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16 Jun 2006, at 10:28, Andreas Jung wrote: My recommendation: 1 yr deprecation period as it is now 1 yr + X maintenance period for older branches. +1 jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin)

[Zope-dev] Re: Zope2 Bugday Results

2006-06-16 Thread Rocky Burt
Whoot! Nice going guys, sorry I couldn't be more helpful. - Rocky On Thu, 2006-15-06 at 19:37 -0400, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Issues Resolved - 1777: ExtensionClass delattr raises KeyError, http://www.zope.org/Collectors/Zope/1777 -