Re: [Zope] Zope 2.7.8 or Zope 2.8.X

2005-10-13 Thread Andreas Jung



--On 14. Oktober 2005 12:43:53 +0800 Bakhtiar A Hamid 
<[EMAIL PROTECTED]> wrote:



On 10/14/05, Dennis Allison <[EMAIL PROTECTED]> wrote:



We have been running on Zope 2.7.6 with a few patches. I am now planning
to migrate to Zope 2.7.8 but am pondering the move to Zope 2.8. We are in
a production situation and cannot accept any downtime, so I am very
concerned about stability and compatibility.

Can the list provide words of advice?




If you have something in production and can not risk a downtime then you 
have of course a testing or staging server to test your stuff with Zope 2.8.


-aj




pgps1XMuObuk8.pgp
Description: PGP signature
___
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] Problem with strftime.

2005-10-13 Thread Andreas Jung



--On 13. Oktober 2005 14:46:26 -0700 "Jason C. Leach" 
<[EMAIL PROTECTED]> wrote:



Hi:

If I use this line in a Python script:
   print row['end_date'], row['end_date'].strftime('%d')
I get:
   2005/10/13 12

You can see the day is out by one. Should be 13, but is gets converted
as 12.  So I'm curious what's up with that?

Provide a detailed description how to reproduce that...especially what type 
is  row[‘end_date‘]? Where is it coming from?


-aj



pgpoFccAaBofQ.pgp
Description: PGP signature
___
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] Zope 2.7.8 or Zope 2.8.X

2005-10-13 Thread Bakhtiar A Hamid
On 10/14/05, Dennis Allison <[EMAIL PROTECTED]> wrote:
We have been running on Zope 2.7.6 with a few patches.  I am now planningto migrate to Zope 2.7.8 but am pondering the move to Zope 2.8.  We are ina production situation and cannot accept any downtime, so I am very
concerned about stability and compatibility.Can the list provide words of advice?

not an advice, but what we went through ..

i'd suggest 2.8, but test first.  and then test again.  when everything is ok, you can test again. :P

2.8 has many features compared to 2.7.  with zope, testing your
instance is not that hard.  install python2.3.5 and zope. 
get all your products.  get your data.fs  start zope, fix
problems.  surf your site(s) 

as somebody mentioned, if you make use a lot of Catalogs, you need to
manage_convertIndexes.  and if you use dtml (esp dtml-in with
sort=something), you need to move the sort to your catalog queries.

i'm in the second stage of testing and will be going to the next stage (of testing)

hth

p/s - don't forget to test your instance

___Zope maillist  -  
Zope@zope.orghttp://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 )-- 
http://myzope.kedai.com.my - my-zope 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 )


[Zope] ANN: ZSyncer 0.7-beta1

2005-10-13 Thread Paul Winkler
Hi folks,

Anybody who's been wanting to get ZSyncer working on Zope 2.8,
please check out the new 0.7-beta1 on sourceforge:
http://sourceforge.net/project/showfiles.php?group_id=28073&package_id=20913&release_id=363376

This is a beta release!
I'm hoping for feedback from anybody who is using any of the
following: Zope 2.8+, CMF 1.5+, and/or ZClasses.

Changes from previous release can be read here:
http://sourceforge.net/project/shownotes.php?release_id=363376

-- 
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] Zope 2.7.8 or Zope 2.8.X

2005-10-13 Thread Paul Winkler
Dennis, if you're still using ZSyncer, I don't think it works with 2.8 yet.
I'll be finally trying to fix that in a minute...

-PW

On 10/13/05, J Cameron Cooper <[EMAIL PROTECTED]> wrote:
> Dennis Allison wrote:
> > We have been running on Zope 2.7.6 with a few patches.  I am now planning
> > to migrate to Zope 2.7.8 but am pondering the move to Zope 2.8.  We are in
> > a production situation and cannot accept any downtime, so I am very
> > concerned about stability and compatibility.
> >
> > Can the list provide words of advice?
>
> Try it on a test server first.
>
> --jcc
> --
> "Building Websites with Plone"
> http://plonebook.packtpub.com/
>
> Enfold Systems, LLC
> http://www.enfoldsystems.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 )
>


--
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] Zope 2.7.8 or Zope 2.8.X

2005-10-13 Thread J Cameron Cooper

Dennis Allison wrote:
We have been running on Zope 2.7.6 with a few patches.  I am now planning 
to migrate to Zope 2.7.8 but am pondering the move to Zope 2.8.  We are in 
a production situation and cannot accept any downtime, so I am very 
concerned about stability and compatibility.


Can the list provide words of advice?


Try it on a test server first.

--jcc
--
"Building Websites with Plone"
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.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] constructor product in Zope 2.8.1

2005-10-13 Thread Peter Bengtsson
>
> Can you show us your __init__ stuff?
>
> Yes
>
> Here it is:
>
> from eba import eba
>
>
> def initialize(context):
> context.registerClass(
> eba,
> constructors = (
> eba.manage_addEbaForm,
> eba.manage_addEba
> ),
> icon="www/eba.gif"
>
There's your problem!

Is "eba" a folder or a file (ie. eba.py)
If it's a file, then what you're saying is this::

from eba.py import 
context.registerClass(,
 constructors= (.manage_addEbaForm,
...

But, "manage_addEbaForm" isn't a method of the class "eba", it's a
function of the module eba.py

Solution:
import eba
context.registerClass(eba.eba,
constructors = (eba.manage_addebaForm,
  ..


>
> )
>
>
> misc_ = {"inst.gif": ImageFile("www/inst.gif",globals()),
>
> "k1.png": ImageFile("www/k1.png",globals()),
>
> "k2.png": ImageFile("www/k2.png",globals()),
>
> "k3.png": ImageFile("www/k3.png",globals()),
>
> "lock.png": ImageFile("www/lock.png",globals()),
>
> "unlock.png": ImageFile("www/unlock.png",globals()),
>
> "vink_16.gif": ImageFile("www/vink_16.gif",globals()),
>
> "kruisje_16.gif": ImageFile("www/kruisje_16.gif",globals()),
>
> "image.gif": ImageFile("www/image.gif",globals()),
>
> "print_icon.gif": ImageFile("www/print_icon.gif",globals()),
>
> "up.gif": ImageFile("www/up.gif",globals()),
>
> "pre.gif": ImageFile("www/pre.gif",globals()),
>
> "toolbar.gif": ImageFile("www/toolbar.gif",globals()),
>
> "nieuw_32.png": ImageFile("www/nieuw_32.png",globals()),
>
> "wis_32.png": ImageFile("www/wis_32.png",globals()),
>
> "hernummeren_32.png": ImageFile("www/hernummeren_32.png",globals()),
>
> "basis_32.png": ImageFile("www/basis_32.png",globals()),
>
> "specifiek_32.png": ImageFile("www/specifiek_32.png",globals()),
>
> "editors_32.gif": ImageFile("www/editors_32.gif",globals()),
>
> "site_32.png": ImageFile("www/site_32.png",globals()),
>
> "bewaren_32.png": ImageFile("www/bewaren_32.png",globals()),
>
> "annuleren_32.png": ImageFile("www/annuleren_32.png",globals()),
>
>
> }
>
>
>
> Henny van der Linde
>
>
>


--
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] constructor product in Zope 2.8.1

2005-10-13 Thread Henny van der Linde (zettai)


- Original Message - 
From: "Peter Bengtsson" <[EMAIL PROTECTED]>

To: "Henny van der Linde" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, October 13, 2005 7:33 PM
Subject: Re: [Zope] constructor product in Zope 2.8.1


Can you show us your __init__ stuff?

Yes

Here it is:

from eba import eba

from ImageFile import ImageFile


def initialize(context):

context.registerClass(

eba,

constructors = (

eba.manage_addEbaForm, 


eba.manage_addEba

),

icon="www/eba.gif"


)


misc_ = {"inst.gif": ImageFile("www/inst.gif",globals()),

"k1.png": ImageFile("www/k1.png",globals()),

"k2.png": ImageFile("www/k2.png",globals()),

"k3.png": ImageFile("www/k3.png",globals()),

"lock.png": ImageFile("www/lock.png",globals()),

"unlock.png": ImageFile("www/unlock.png",globals()),

"vink_16.gif": ImageFile("www/vink_16.gif",globals()),

"kruisje_16.gif": ImageFile("www/kruisje_16.gif",globals()),

"image.gif": ImageFile("www/image.gif",globals()),

"print_icon.gif": ImageFile("www/print_icon.gif",globals()),

"up.gif": ImageFile("www/up.gif",globals()),

"pre.gif": ImageFile("www/pre.gif",globals()),

"toolbar.gif": ImageFile("www/toolbar.gif",globals()),

"nieuw_32.png": ImageFile("www/nieuw_32.png",globals()),

"wis_32.png": ImageFile("www/wis_32.png",globals()),

"hernummeren_32.png": ImageFile("www/hernummeren_32.png",globals()),

"basis_32.png": ImageFile("www/basis_32.png",globals()),

"specifiek_32.png": ImageFile("www/specifiek_32.png",globals()),

"editors_32.gif": ImageFile("www/editors_32.gif",globals()),

"site_32.png": ImageFile("www/site_32.png",globals()),

"bewaren_32.png": ImageFile("www/bewaren_32.png",globals()),

"annuleren_32.png": ImageFile("www/annuleren_32.png",globals()),


}



Henny van der Linde


___
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] External Methods

2005-10-13 Thread Peter Bengtsson
2005/10/13, DS <[EMAIL PROTECTED]>:
> Hi, I am just learning Zope, and I wanted to try external methods.  I
> first tried a symlink in the Extension directory, but zope reported it
> couldn't find it.  I then copied the file into the Extension directory
> and was successful at that.  I assume that happened that way perhaps for
> my own protection.  Is that true?  Or, is there a better way to do
> that?  I have a project directory where I have been working on modules,
> and I was hoping to avoid copying them periodically to Extensions as I
> test one thing or another.

Symbolic link or hard copy, to Zope it shouldn't matter. Python
doesn't really make a difference between not finding a file and
finding it but can't open it due to security permissions.
Check permissions on it.

>
> My next question is that I import other modules within the module that I
> just mentioned.  I have copied them over to Extension, but still have an
> error that they are not found.  Am I trying to do something prohibited
> with Zope.  What controls that?
>
/Extensions is NOT part of the PYTHONPATH
Don't stick your additional module in Extensions, put them somewhere
else like /home/ds/foobar
then in your one python file in Extensions you can do:

import sys
sys.path.append(r'/home/ds/foobar')
from foobar import Whatever

> Thanks very much for any help you can give me.
>
> ds
> ___
> 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] External Methods

2005-10-13 Thread DS
Hi, I am just learning Zope, and I wanted to try external methods.  I
first tried a symlink in the Extension directory, but zope reported it
couldn't find it.  I then copied the file into the Extension directory
and was successful at that.  I assume that happened that way perhaps for
my own protection.  Is that true?  Or, is there a better way to do
that?  I have a project directory where I have been working on modules,
and I was hoping to avoid copying them periodically to Extensions as I
test one thing or another.

My next question is that I import other modules within the module that I
just mentioned.  I have copied them over to Extension, but still have an
error that they are not found.  Am I trying to do something prohibited
with Zope.  What controls that?

Thanks very much for any help you can give me.

ds
___
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] Problem with strftime.

2005-10-13 Thread Jason C. Leach
Hi:

If I use this line in a Python script:
   print row['end_date'], row['end_date'].strftime('%d')
I get:
   2005/10/13 12

You can see the day is out by one. Should be 13, but is gets converted
as 12.  So I'm curious what's up with that?

  Zope Version
(Zope 2.8.1-final, python 2.4.0, freebsd5)
Python Version
2.4 (#2, Aug 25 2005, 15:17:08) [GCC 3.4.2 [FreeBSD] 20040728]

Thanks,
Jason.

--

 Jason C. Leach
 PGP Key: 0x62DDDF75
 Keyserver: gpg.mit.edu
___
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: Zope 2.8.2 released

2005-10-13 Thread Paul Winkler

Tres Seaver said:
> Paul Winkler wrote:
(snip)
>> Also, looking over the release notes, I see that there is one bugfix
>> that made it into the 2.8 branch and the trunk, thanks to Andreas -
>> the #1895 fix to test.py.
>> But the fix does not seem to have been noted in CHANGES.txt on the 2.8
>> branch or the trunk.  It *is* in the 2.7.8 CHANGES.txt because I made
>> sure to do that when I made the same fix on the 2.7 branch. If there
>> are no objections, I will modify CHANGES.txt on the 2.8 branch and the
>> trunk.
>
> +1.

OK, done for 2.8 branch. But I'm leaving the trunk alone, as it looks
like lots of stuff from 2.8 is not yet in the trunk CHANGES.txt,
and I don't want to confuse things further - AFAICT the normal procedure
is to let the release manager handle the merging of bugfixes in
CHANGES.txt.

Thanks again Andreas and anybody else who worked on the release,

-PW

-- 
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] Zope 2.7.8 or Zope 2.8.X

2005-10-13 Thread Jake
I am not the list, but I would go with 2.7.8.

2.8 will need more work from your side in the catalogs.

Jake
-- 
http://www.ZopeZone.com


Dennis Allison said:
>
> We have been running on Zope 2.7.6 with a few patches.  I am now planning
> to migrate to Zope 2.7.8 but am pondering the move to Zope 2.8.  We are in
> a production situation and cannot accept any downtime, so I am very
> concerned about stability and compatibility.
>
> Can the list provide words of advice?
>
>
>
> ___
> 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] Zope 2.7.8 or Zope 2.8.X

2005-10-13 Thread Dennis Allison

We have been running on Zope 2.7.6 with a few patches.  I am now planning 
to migrate to Zope 2.7.8 but am pondering the move to Zope 2.8.  We are in 
a production situation and cannot accept any downtime, so I am very 
concerned about stability and compatibility.

Can the list provide words of advice?



___
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] constructor product in Zope 2.8.1

2005-10-13 Thread Peter Bengtsson
Can you show us your __init__ stuff?

2005/10/13, Henny van der Linde <[EMAIL PROTECTED]>:
> Hi,
>
> I have the following constructor for an external product I build.
>
> def manage_addEba(dispatcher, id='eba', title='Title here',REQUEST=None):
> "Add a Basis element to a folder."
> nEba=eba(id,title)
> dispatcher.Destination()._setObject(id, nEba)
>  if REQUEST is not None:
>dispatcher.manage_main(dispatcher,REQUEST)
>
> manage_addEbaForm = DTMLFile('dtml/manage_addEbaForm', globals())
>
>
> We are upgrading to Zope 2.8.1. Now I get the follwing error when I try to
> add the product (eba).
>
> Error Type: TypeError
> Error Value: unbound method manage_addEba() must be called with eba instance
> as first argument (got str instance instead)
>
>
> Can anyone shed some some light on this?
>
> Thanks,
>
> Henny
>
>
>
>
>
>
> ___
> 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 )


Re: [Zope] Zope 2.8.2 released

2005-10-13 Thread Paul Winkler
Hooray, new stable releases are always a happy day :)
Thank you Andreas!

Sadly, I have to report some SNAFUs on zope.org,
so I am cc'ing the zope-web list:

On the "Download Zope" page, the latest stable version is still listed
as 2.8.1.   http://www.zope.org/Products/

Also from the main download page, the link labelled
"Our entire collection of zope releases is here"
pointing to http://www.zope.org/Products/Zope/swpackage_releases
requires you to be logged in.  Anonymous can't view that page.
(And I get "insufficient privileges" when I am logged in.)

The same authorization problem occurs when clicking on the "zope"
breadcrumb from the 2.8.2 or 2.7.8 release pages, which points to
http://www.zope.org/Products/Zope

Also, looking over the release notes, I see that there is one bugfix
that made it into the 2.8 branch and the trunk, thanks to Andreas -
the #1895 fix to test.py.
But the fix does not seem to have been noted in CHANGES.txt on the
2.8 branch or the trunk.  It *is* in the 2.7.8 CHANGES.txt because I
made sure to do that when I made the same fix on the 2.7 branch.
If there are no objections, I will modify CHANGES.txt on the 2.8 branch
and the trunk.

Thanks again!

-PW

Andreas Jung said:
>
>
> Hi all,
>
> on behalf of Zope Corporation and the Zope community I am pleased to
> announce the release of Zope 2.8.2.  You can download Zope 2.8.2 from
>
>   http://www.zope.org/Products/Zope/2.8.2/
>
> Some new features of Zope 2.8:
>
>- ZODB 3.4 with MVCC (multi version concurrency control) support.
>  MVCC solves nearly every problem with ZODB read-conflict errors
> which is very important for high-traffic Zope sites.
>
>- Extension Classes were rewritten as Python new-style classes making
>  all features of Python new-style classes available in Zope
>  objects. This includes support for cyclic garbage collection.
>
>- Integration of Zope 3 technologies through Five (see
> http://codespeak.net/z3/five/)
>
>
> For more information on what is new in this release, see the
> CHANGES.txt files for the release:
>
>   http://www.zope.org/Products/Zope/2.8.2/CHANGES.txt
>
> See also:
>
>   http://www.zope.org/Wikis/DevSite/Projects/Zope2.8/OverView
>
> Please bring all the bugs you have found to the Zope bugtracker:
>
>http://collector.zope.org/Zope":http://collector.zope.org/Zope
>
> For more information on the available Zope releases, guidance for
> selecting the right distribution and installation instructions, please
> see:
>
>http://www.plope.com/Books/2_7Edition/InstallingZope.stx
>
> Please also keep in mind that Zope 2.8.2 requires Python 2.3.5. Zope
> 2.8.2 is not certified for any Python 2.4.x versions. So using Python
> 2.4 is  neither recommended nor supported and any related questions or
> problems are  likely to be ignored until 2.4 is an officially supported
> Python version  for Zope.
>
> --
> Andreas Jung(andreas at zopyx dot com)


-- 
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] Error Type: ExpatError

2005-10-13 Thread Garito

Fred Drake escribió:


On 10/13/05, Garito <[EMAIL PROTECTED]> wrote:
 


self.Dame({'nombre': self.getId() + '.mm'})

Dame is a function that returns a ZCatalog query where nombre is an index
   


...
 


This File object returns the text of the last attachment I send you some
mails ago
   



The index_html() method returns the freemind XML?  Interesting.

What version of Python are you using?  Do you have PyXML installed? 
If so, what version are you using?



 -Fred

--
Fred L. Drake, Jr.
"Society attacks early, when the individual is helpless." --B.F. Skinner
 

A File object returns the content of the file if you call index_html() I 
don't know if is the best way (if not please point me!)

My development systems is:

Windows XP Pro
Python 2.3.5
Zope 2.8.0

I'm not conscious about install PyXML then I reply No to your question 
about it


Thanks a lot, Fred, for your help

--
Mis Cosas
http://blogs.sistes.net/Garito/


___
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] constructor product in Zope 2.8.1

2005-10-13 Thread Henny van der Linde

Hi,

I have the following constructor for an external product I build.

def manage_addEba(dispatcher, id='eba', title='Title here',REQUEST=None):
   "Add a Basis element to a folder."
   nEba=eba(id,title)
   dispatcher.Destination()._setObject(id, nEba)
if REQUEST is not None:
  dispatcher.manage_main(dispatcher,REQUEST)

manage_addEbaForm = DTMLFile('dtml/manage_addEbaForm', globals())


We are upgrading to Zope 2.8.1. Now I get the follwing error when I try to 
add the product (eba).


Error Type: TypeError
Error Value: unbound method manage_addEba() must be called with eba instance 
as first argument (got str instance instead)



Can anyone shed some some light on this?

Thanks,

Henny






___
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] error trying to import smtplib (unauthorized)

2005-10-13 Thread Nicolas Georgakopoulos

Chris Withers wrote:


Nicolas Georgakopoulos wrote:

I will try VerboseSecurity for a last chance ... if it doesn't work I 
will install the lates Zope release.



No, you haven't anyway taken me through, step by step, what you've 
done to get where you are...


What release of Zope are you using?

Chris


2.8.1 ...
___
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] error trying to import smtplib (unauthorized)

2005-10-13 Thread Chris Withers

Nicolas Georgakopoulos wrote:
I will try VerboseSecurity for a last chance ... if it doesn't work I 
will install the lates Zope release.


No, you haven't anyway taken me through, step by step, what you've done 
to get where you are...


What release of Zope are you using?

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] error trying to import smtplib (unauthorized)

2005-10-13 Thread Nicolas Georgakopoulos

David Convent wrote:


Python scripts are run in a restricted environment,
move your code to either an external method or a python zope product 
built on the filesystem


How can I move the code to another python zope product ?
___
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] error trying to import smtplib (unauthorized)

2005-10-13 Thread Nicolas Georgakopoulos

Chris Withers wrote:


Nicolas Georgakopoulos wrote:


Trying to execute the following code from a python script

from smtplib import SMTP
from email.MIMEText import MIMEText

I get a error:

*Error Type: ImportError*
*Error Value: import of "SMTP" from "smtplib" is unauthorized. You 
are not allowed to access 'SMTP' in this context

*
Why I can't access SMTP if I am a user manager with all the access 
enabled for managers in the current context ?



*continues banging head against brick wall*
Because it has no security declarations. If you bothered to install 
VerboseSecurity it would have told you this...


MailHosts are how you send mail in Zope...

MailTemplates are what you want to use, I still don't understand why 
you're having so many problems, I simply cannot reproduce what you're 
seeing...


Start with a fresh, clean Zope instance and tell me the steps you go 
(every single one of them!) through to get to the point where you can 
try the python script and get the errors you were complaining about 
before...


cheers,

Chris

I have describe you on the previous mails all my steps and the error's I 
get
I will try VerboseSecurity for a last chance ... if it doesn't work I 
will install the lates Zope release.

___
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] error trying to import smtplib (unauthorized)

2005-10-13 Thread Chris Withers

Nicolas Georgakopoulos wrote:

Trying to execute the following code from a python script

from smtplib import SMTP
from email.MIMEText import MIMEText

I get a error:

*Error Type: ImportError*
*Error Value: import of "SMTP" from "smtplib" is unauthorized. You are 
not allowed to access 'SMTP' in this context

*
Why I can't access SMTP if I am a user manager with all the access 
enabled for managers in the current context ?


*continues banging head against brick wall*

Because it has no security declarations. If you bothered to install 
VerboseSecurity it would have told you this...


MailHosts are how you send mail in Zope...

MailTemplates are what you want to use, I still don't understand why 
you're having so many problems, I simply cannot reproduce what you're 
seeing...


Start with a fresh, clean Zope instance and tell me the steps you go 
(every single one of them!) through to get to the point where you can 
try the python script and get the errors you were complaining about 
before...


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] error trying to import smtplib (unauthorized)

2005-10-13 Thread David Convent

Python scripts are run in a restricted environment,
move your code to either an external method or a python zope product 
built on the filesystem


Nicolas Georgakopoulos wrote:


Trying to execute the following code from a python script

from smtplib import SMTP
from email.MIMEText import MIMEText

I get a error:

*Error Type: ImportError*
*Error Value: import of "SMTP" from "smtplib" is unauthorized. You are 
not allowed to access 'SMTP' in this context

*
Why I can't access SMTP if I am a user manager with all the access 
enabled for managers in the current context ?

___
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] error trying to import smtplib (unauthorized)

2005-10-13 Thread Nicolas Georgakopoulos

Trying to execute the following code from a python script

from smtplib import SMTP
from email.MIMEText import MIMEText

I get a error:

*Error Type: ImportError*
*Error Value: import of "SMTP" from "smtplib" is unauthorized. You are 
not allowed to access 'SMTP' in this context

*
Why I can't access SMTP if I am a user manager with all the access 
enabled for managers in the current context ?

___
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] Error Type: ExpatError

2005-10-13 Thread Fred Drake
On 10/13/05, Garito <[EMAIL PROTECTED]> wrote:
> self.Dame({'nombre': self.getId() + '.mm'})
>
> Dame is a function that returns a ZCatalog query where nombre is an index
...
> This File object returns the text of the last attachment I send you some
> mails ago

The index_html() method returns the freemind XML?  Interesting.

What version of Python are you using?  Do you have PyXML installed? 
If so, what version are you using?


  -Fred

--
Fred L. Drake, Jr.
"Society attacks early, when the individual is helpless." --B.F. Skinner
___
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] REQUEST not accessible

2005-10-13 Thread Jens Vagelpohl


On 13 Oct 2005, at 13:38, Jürgen Herrmann wrote:

what i'm worried about is wether i did break anything else, possibly
with even worse results... (i don't like hidden bugs)



By explicitly passing REQUEST? I doubt it.


No i meant that i already broke something that did work before:
obviously some code changes of mine lead to the results described  
before,

i assume it has to do with my code as i didn't install any products or
upgrade zope in the last 3 weeks, and the previous release (2 weeks  
ago)

the catalog search was working fine...
that, i suspected, might break things in other places too...


I have no idea what your code (or your recent changes) look like, so  
I cannot answer that question.


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: [Zope] REQUEST not accessible

2005-10-13 Thread Jürgen Herrmann

[ Jens Vagelpohl wrote:]
>
> On 13 Oct 2005, at 11:56, Jürgen Herrmann wrote:
>>> Apart from whether this worked previosuly or not, it is bad coding
>>> practice to rely on assumptions such as "it will somehow acquire the
>>> REQUEST". You should really change your code to explicity pass in
>>> REQUEST everywhere. Then you can stop worrying.
>>>
>>>
>> thanks for the answer, the coding style is one thing, and i don't have
>> the least bit of a problem to stick with this in the future (already
>> changed all the occurrences anyway to make it work again).
>>
>> what i'm worried about is wether i did break anything else, possibly
>> with even worse results... (i don't like hidden bugs)
>
> By explicitly passing REQUEST? I doubt it.
No i meant that i already broke something that did work before:
obviously some code changes of mine lead to the results described before,
i assume it has to do with my code as i didn't install any products or
upgrade zope in the last 3 weeks, and the previous release (2 weeks ago)
the catalog search was working fine...
that, i suspected, might break things in other places too...
>
>
>> btw. is it also bad practice to use self.REQUEST in methods?
>> what about def foo(self, REQUEST=None), when and how is REQUEST
>> passed there? is it also not a good coding style, if not passing it
>> directly?
>
> The common case is to pass it in explicitly. To pass it in and avoid
> any surprises see the solution discussed above. Explicit is better
> than implicit.
>
> jens

juergen
___

>> XLhost.de - eXperts in Linux hosting <<

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de
___
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] REQUEST not accessible

2005-10-13 Thread Jens Vagelpohl


On 13 Oct 2005, at 11:56, Jürgen Herrmann wrote:

Apart from whether this worked previosuly or not, it is bad coding
practice to rely on assumptions such as "it will somehow acquire the
REQUEST". You should really change your code to explicity pass in
REQUEST everywhere. Then you can stop worrying.



thanks for the answer, the coding style is one thing, and i don't have
the least bit of a problem to stick with this in the future (already
changed all the occurrences anyway to make it work again).

what i'm worried about is wether i did break anything else, possibly
with even worse results... (i don't like hidden bugs)


By explicitly passing REQUEST? I doubt it.



btw. is it also bad practice to use self.REQUEST in methods?
what about def foo(self, REQUEST=None), when and how is REQUEST
passed there? is it also not a good coding style, if not passing it  
directly?


The common case is to pass it in explicitly. To pass it in and avoid  
any surprises see the solution discussed above. Explicit is better  
than implicit.


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 )


[Zope] Zope 2.7.8 released

2005-10-13 Thread Andreas Jung



Dear Zope Community,

on behalf of Zope Corporation and all Zope 2 developers and contributors
I am pleased to announce the release of Zope 2.7.8 final.

Zope 2.7.8 can be downloaded from

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

The release notes can be found at

  http://www.zope.org/Products/Zope/2.7.8/CHANGES.txt

For information on using Python 2.4 with Zope 2.7.8: see doc/INSTALL.txt

Andreas Jung
Zope 2 Release Manager  

pgpLnk8lWpVRM.pgp
Description: PGP signature
___
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] Zope 2.8.2 released

2005-10-13 Thread Andreas Jung



Hi all,

on behalf of Zope Corporation and the Zope community I am pleased to 
announce the release of Zope 2.8.2.  You can download Zope 2.8.2 from


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

Some new features of Zope 2.8:

  - ZODB 3.4 with MVCC (multi version concurrency control) support.
MVCC solves nearly every problem with ZODB read-conflict errors
which is very important for high-traffic Zope sites.

  - Extension Classes were rewritten as Python new-style classes making
all features of Python new-style classes available in Zope
objects. This includes support for cyclic garbage collection.

  - Integration of Zope 3 technologies through Five (see 
http://codespeak.net/z3/five/)



For more information on what is new in this release, see the
CHANGES.txt files for the release:

 http://www.zope.org/Products/Zope/2.8.2/CHANGES.txt

See also:

 http://www.zope.org/Wikis/DevSite/Projects/Zope2.8/OverView

Please bring all the bugs you have found to the Zope bugtracker:

  http://collector.zope.org/Zope":http://collector.zope.org/Zope

For more information on the available Zope releases, guidance for selecting
the right distribution and installation instructions, please see:

  http://www.plope.com/Books/2_7Edition/InstallingZope.stx

Please also keep in mind that Zope 2.8.2 requires Python 2.3.5. Zope 2.8.2
is not certified for any Python 2.4.x versions. So using Python 2.4 is 
neither recommended nor supported and any related questions or problems are 
likely to be ignored until 2.4 is an officially supported Python version 
for Zope.


--
Andreas Jung(andreas at zopyx dot com)



pgp7nejZRRCgu.pgp
Description: PGP signature
___
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] REQUEST not accessible

2005-10-13 Thread Jürgen Herrmann

[ Jens Vagelpohl wrote:]
>
> On 13 Oct 2005, at 11:39, Jürgen Herrmann wrote:
>> up to some time in them i could just write:
>> tal:define="results python:here.Catalog.searchResults()"
>>
>> it seems this isn't working anymore, the catalog would return
>> all brains instead of seraching the relevant ones... (completely
>> ignoreing everything in REQUEST)
>>
>> instead i have to write now:
>> tal:define="results python:here.Catalog.searchResults
>> (REQUEST=request)"
>>
>> i suspect that the catalog was able to acquire REQUEST via
>> self.REQUEST
>> and this isn't working anymore. has anyone had a similar problem? i
>> don't know what i have changed leading to these kinds of problems...
>
> Apart from whether this worked previosuly or not, it is bad coding
> practice to rely on assumptions such as "it will somehow acquire the
> REQUEST". You should really change your code to explicity pass in
> REQUEST everywhere. Then you can stop worrying.
>
> jens
>
thanks for the answer, the coding style is one thing, and i don't have
the least bit of a problem to stick with this in the future (already
changed all the occurrences anyway to make it work again).

what i'm worried about is wether i did break anything else, possibly
with even worse results... (i don't like hidden bugs)

btw. is it also bad practice to use self.REQUEST in methods?
what about def foo(self, REQUEST=None), when and how is REQUEST
passed there? is it also not a good coding style, if not passing it directly?

regards, juergen herrmann
___

>> XLhost.de - eXperts in Linux hosting <<

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de
___
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] help with MailTemplates 1.0.0

2005-10-13 Thread Nicolas Georgakopoulos

Chris Withers wrote:


And to send the attachment I get another error:
Error Type: Unauthorized
 Error Value: You are not allowed to access 'add_file' in 
this context


The user executing the python script that calls add_file needs to have 
the 'Use mailhost services' permission, did they?
Shane Hathaway's VerboseSecurity product may help you figure out 
what's going on...


Why should I use this product? I'm a Manager user and I have permission 
in the current folder where the object's is to Use MailHost Services , 
Add Documents, Images, and Files 
 
and Change Images and Files 


I change the python script code to :
 
from email.MIMEBase import MIMEBase

msg=container.my_mt.as_message(
 mfrom='[EMAIL PROTECTED]',
 mto='[EMAIL PROTECTED]',
 message='This is a test!',
 subject='Attempt 100 !')
msg.send()

*have removed the ->msg.add_file(container['myfile.bin']) and Zope 
prompts for user name and password. Whatever I write (correct login or 
not) it keeps prompting the same.

If  I choose cancel your product show me the current message:

Error Type: Unauthorized
Error Value: You are not allowed to access 'send' in this 
context


No error is reported in the error log...


___
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] REQUEST not accessible

2005-10-13 Thread Jens Vagelpohl


On 13 Oct 2005, at 11:39, Jürgen Herrmann wrote:

up to some time in them i could just write:
tal:define="results python:here.Catalog.searchResults()"

it seems this isn't working anymore, the catalog would return
all brains instead of seraching the relevant ones... (completely
ignoreing everything in REQUEST)

instead i have to write now:
tal:define="results python:here.Catalog.searchResults 
(REQUEST=request)"


i suspect that the catalog was able to acquire REQUEST via  
self.REQUEST

and this isn't working anymore. has anyone had a similar problem? i
don't know what i have changed leading to these kinds of problems...


Apart from whether this worked previosuly or not, it is bad coding  
practice to rely on assumptions such as "it will somehow acquire the  
REQUEST". You should really change your code to explicity pass in  
REQUEST everywhere. Then you can stop worrying.


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 )


[Zope] REQUEST not accessible

2005-10-13 Thread Jürgen Herrmann
hi all!

i have several products using PageTemplateFiles a lot.

up to some time in them i could just write:
tal:define="results python:here.Catalog.searchResults()"

it seems this isn't working anymore, the catalog would return
all brains instead of seraching the relevant ones... (completely
ignoreing everything in REQUEST)

instead i have to write now:
tal:define="results python:here.Catalog.searchResults(REQUEST=request)"

i suspect that the catalog was able to acquire REQUEST via self.REQUEST
and this isn't working anymore. has anyone had a similar problem? i
don't know what i have changed leading to these kinds of problems...

best regards, juergen herrmann
___

>> XLhost.de - eXperts in Linux hosting <<

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de
___
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 toclient

2005-10-13 Thread Chris Withers

Frey, Peter wrote:

this statement is true, in theory, but sometimes one hits problems that cannot 
be solved without help of a debugger.
There may be two circumstances where on NEEDs a debugger in the production 
environment


Hmmm, not convinced ;-)


a) when the problem is that urgent that there is no time to spend to set up and 
reproduce the problem in a test environment


You should ALWAYS have some kind of development or testing environment 
up, except in the tinyest of projects...



b) when the problem is not reproducable in test environemnt (as we had this 
month with a debug_mode problem on one of our production servers)


Okay, so long as you don't mind kissing performance goodbye. Maybe you 
enable profiler support and install PTProfiler on production too? ;-)



but still keep the option open to use the debugger directly on the production 
system (where it is installed then, when one of the two cases mentionned above 
come true) to get a fast solution of a problem


Okay, but don't just leave it installed ;-)


that is why our interest in the Zope Debugger product, as pdb is available on 
all systems but debugging script based code with it not that easy.
and WingDbg/WingIDE is normally to heavy for a production server.


Well, try it, zdb is pretty lightweight code-wise, and it'd be 
interesting to see if you notice any memory or performance problems as a 
result, I'm just glad I'm not the one who's testing that ;-)



one more thought: we need to get experience with Zope Debugger BEFORE an 
emergency happens, so I tried it on a development system where WingDbg is 
installed (and used) and found that installing the Zope Debugger lets WingDbg 
fail, and had to remove it again.
this was the start of this email chain


Yep, I know, still curious as to why that is... try putting some print 
statements in all the patched methods, and company with zdb installed 
and without... see what's no longer getting called and let me know ;-)


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] Show ISO-8859-7 Results in a site using UTF-8

2005-10-13 Thread Andreas Jung



--On 13. Oktober 2005 13:20:07 +0300 "Thomas G. Apostolou" 
<[EMAIL PROTECTED]> wrote:




Hello all,
i am using Zope 2.7.0 and i get some results from SQL Server 2000 with a
python module's fanction witch i call from with in a DTML Method.


2.7.0 is old. Upgrade!



The data is comming encoded in ISO-8859-7 (probably due to database
setup).
I changed the setting of the default encoding from ZMI to ISO-8859-7 for
the entiry site because of the data (temporarly) but now the same tings
has to be transfered and be part of another site using UTF-8.



What is your question? How to migrate strings from iso-8859-7 to utf?

-aj


pgpd0z5BqCMfl.pgp
Description: PGP signature
___
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] Show ISO-8859-7 Results in a site using UTF-8

2005-10-13 Thread Thomas G. Apostolou

Hello all,
i am using Zope 2.7.0 and i get some results from SQL Server 2000 with a
python module's fanction witch i call from with in a DTML Method.

The data is comming encoded in ISO-8859-7 (probably due to database
setup).
I changed the setting of the default encoding from ZMI to ISO-8859-7 for
the entiry site because of the data (temporarly) but now the same tings
has to be transfered and be part of another site using UTF-8.

Any help would be very nice!
Thanks in advance!


PS:Newbie... just tranfering myself from DTML to PT.


Thomas G. Apostolou
Software Engineer
Θωμάς Γ. Αποστόλου
Μηχανικός Λογισμικού
___
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] Zope Debugger lets WingDbg fail to connect toclient

2005-10-13 Thread Chris Withers

Hi John,

Wingware Support wrote:


Right now, Wing only supports file system based code.  


Really? Why?

For code in the 
database, I'd think you would want to set co_filename to some sort of 
url. 


You could always look at the product I mailed you about, it's not 
exactly big ;-)


Somehow the debugger needs to find the source text that produced a 
code object, and using co_filename is the standard way of doing this.


Yep, that's what zdb does..

By unpluggable do you mean it assumes code is on the file system?  


Yeah, and it certainly was a fair assumption, but what with now having 
code coming form .zip's in plain python and zodb in Zope, it reallt 
could do with a good kicking...


Yes, you don't want the debugger on a production system.  Simply setting 
the co_filename attribute won't slow the system down, though.


Yup, but zdb pre-stuff the linecache so the normal pdb mechanisms can 
find the code, and that _is_ expensive ;-) Not to mention oh so many 
monkey patches calls which both zbd and WingDbg suffer from ;-)


cheers,

Chris - who would be interested to know if you actually downloaded zdb 
and had a look at its source...


--
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] help with MailTemplates 1.0.0

2005-10-13 Thread Chris Withers

Nicolas Georgakopoulos wrote:
I make it work , the fist time I try to use it I had copied my Mailhost 
object from another folder and it wasn't working. I delete it and create 
another one with a different name. When I go to the MailTemplate object 
to chooses my new MailHost it was already selected but still not 
working. 


Yes, this is annoying and slightly confusing, I've made a note on the 
revelent issue:


https://secure.simplistix.co.uk/support/issue181

Trying to execute the attachment example , you forgot to put ' ' on the 
second mail address  line: mto=('[EMAIL PROTECTED]',[EMAIL PROTECTED]),


Oops, thanks for finding that, I've fixed that for the next release.


And to send the attachment I get another error:
Error Type: Unauthorized
 Error Value: You are not allowed to access 'add_file' in this 
context


The user executing the python script that calls add_file needs to have 
the 'Use mailhost services' permission, did they?
Shane Hathaway's VerboseSecurity product may help you figure out what's 
going on...


- __traceback_info__: {'path': ['message'], 
'TraversalRequestNameStack': []}

KeyError: 'message'


Yes, well, see my other reply about this...

PS: The test mail I received on the first simple example,  the part  href=""tal:define="url root/absolute_url" tal:attributes="href url" 
tal:content="url"/> doesn't render right , it actually show in the body 
of my message mail  like -->  your interest in: href="http://localhost:8080"; 
>http://localhost:8080 


Oops, another example corrected, the source should read:

http://xml.zope.org/namespaces/tal";
  xmlns:metal="http://xml.zope.org/namespaces/metal";
>Dear ,

 would like to thank you for your interest in:




cheers,

The Web Team


cheers,

Chris - who does appreciate all the testing you're doing :-)

--
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] MailTemplate attachment problem..

2005-10-13 Thread Chris Withers
Yes, okay, you said it once, keep saying again and it just pisses people 
off. I know, I'm good at that ;-)


Nicolas Georgakopoulos wrote:

Trying to send an attachment I get another error:
Error Type: Unauthorized
Error Value: You are not allowed to access 'add_file' in this 
context


This, which is an Unauthorized error...

  Module Products.PageTemplates.Expressions, line 306, in 
restrictedTraverse
   - __traceback_info__: {'path': ['message'], 
'TraversalRequestNameStack': []}

KeyError: 'message'


...doesn't tie up with this, which is a KeyError

This is a KeyError on mesage, meaning that you're referring to 
options/message but not passing in a message parameter when you're 
calling the MailTemplate.



Am I doing something wrong?


Not reading? ;-)

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] Error Type: ExpatError

2005-10-13 Thread Garito

Fred Drake escribió:


On 10/12/05, Garito <[EMAIL PROTECTED]> wrote:
 


What do you need?
   



In this bit of code:

Module Products.Yanged.SitioYanged, line 268, in ObtenerNodo
266 |
267 |   if 'NodoRaiz' not in args:
268>|   args['NodoRaiz'] =
parseString(self.Dame({'nombre': self.getId() +
'.mm'}).index_html(self.REQUEST, self.REQUEST.RESPONSE))
269 |   if 'Nodos' not in args: args['Nodos'] =
args['NodoRaiz'].childNodes
270 |   if 'Nivel' not in args: args['Nivel'] = 0

The expression

   self.Dame({'nombre': self.getId() + '.mm'})

is providing something that's being passed to the XML parser (the
parseString() function).  That string is the data that's in question;
if you can get that string and send it to me (as a file attachment,
preferably), I'll try to figure out what's happening.  The "Yanged"
product I've never heard of, and don't know anything about its code. 
But I know something about the XML parser being used.  :-)



 -Fred

--
Fred L. Drake, Jr.
"Society attacks early, when the individual is helpless." --B.F. Skinner
 


Hi again!
self.Dame({'nombre': self.getId() + '.mm'})

Dame is a function that returns a ZCatalog query where nombre is an index

Then this function return a modified File object (the modification 
constist make File CatalogAware)


This File object returns the text of the last attachment I send you some 
mails ago


Yanged is the product I'm developing

Thanks!


--
Mis Cosas
http://blogs.sistes.net/Garito/


___
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] Determining user from session object - who is logged in?

2005-10-13 Thread Gaute Amundsen

That cleared things up nicely.
I will dig into ExuserFolder (which is our standard) a bit more before i 
decide.

Thanks :)

Gaute

On Thursday 13 October 2005 10:25, Chris McDonough wrote:
> On Thu, 2005-10-13 at 00:26 +0200, Gaute Amundsen wrote:
> > Well, I know that ther might easily be "login less" sessions,
> > but, is it possible to log have "session less" logins?
>
> Yes.  In fact, this is the default for Zope "out of the box".  Zope's
> default user folder uses HTTP basic authentication, which doesn't
> require sessions at all.  Ditto for applications that use CookieCrumbler
> or user folder implementations that use cookies to store credentials.
>
> Zope does not create a session for every user by default, just because
> not all applications require sessions.  It's up to the programmer to
> create use sessions.  Usually this just means putting a mention of
> REQUEST.SESSION in one or more of your scripts or views.
>
> > The first case would not be a problem. I expect one could easily detect
> > the lack of userdata, and skip altering the session, and in that case
> > would not an addScript let me solve this without resort to external
> > methods, or product code?
>
> addScript... sure, doing it this way is likely easy for any given
> application.  It just can't be solved generally for all applications
> because there's no easily-overrideable "do this at login time" hook
> built in to "stock" Zope (although there are definitely hooks for this
> in PAS and probably in exUserFolder too).
>
> - C
___
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] Determining user from session object - who is logged in?

2005-10-13 Thread Chris McDonough
On Thu, 2005-10-13 at 00:26 +0200, Gaute Amundsen wrote:
> Well, I know that ther might easily be "login less" sessions, 
> but, is it possible to log have "session less" logins?

Yes.  In fact, this is the default for Zope "out of the box".  Zope's
default user folder uses HTTP basic authentication, which doesn't
require sessions at all.  Ditto for applications that use CookieCrumbler
or user folder implementations that use cookies to store credentials.

Zope does not create a session for every user by default, just because
not all applications require sessions.  It's up to the programmer to
create use sessions.  Usually this just means putting a mention of
REQUEST.SESSION in one or more of your scripts or views.

> The first case would not be a problem. I expect one could easily detect the 
> lack of userdata, and skip altering the session, and in that case would not 
> an addScript let me solve this without resort to external methods, or product 
> code?

addScript... sure, doing it this way is likely easy for any given
application.  It just can't be solved generally for all applications
because there's no easily-overrideable "do this at login time" hook
built in to "stock" Zope (although there are definitely hooks for this
in PAS and probably in exUserFolder too).

- C



___
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] MailTemplate attachment problem..

2005-10-13 Thread Nicolas Georgakopoulos

Trying to send an attachment I get another error:
Error Type: Unauthorized
Error Value: You are not allowed to access 'add_file' in this 
context


and the traceback:
Traceback (innermost last):
  Module ZPublisher.Publish, line 113, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 256, in _exec
Module Products.PageTemplates.PageTemplate, line 102, in pt_render
   - 
  Module TAL.TALInterpreter, line 206, in __call__
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 501, in do_insertText_tal
  Module Products.PageTemplates.TALES, line 227, in evaluateText
Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: /AtestFordelete/tt
 - Line 12, Column 6
 - Expression: standard:'options/message'
 - Names:
  {'container': ,
   'context': ,
 'default': 0x01152AF8>,

   'here': ,
 'loop': 0x01FC2990>,
 'modules': 
0x0112DD50>,

 'nothing': None,
   'options': {'args': ()},
 'repeat': 0x01FC2990>,
   'request': URL=http://localhost:8080/AtestFordelete/tt>,

 'root': ,
   'template': ,
 'traverse_subpath': [],
 'user': admin}
Module Products.PageTemplates.Expressions, line 183, in __call__
Module Products.PageTemplates.Expressions, line 171, in _eval
Module Products.PageTemplates.Expressions, line 127, in _eval
 - __traceback_info__: options
  Module Products.PageTemplates.Expressions, line 306, in 
restrictedTraverse
   - __traceback_info__: {'path': ['message'], 
'TraversalRequestNameStack': []}

KeyError: 'message'

I had change all my security options in the folder that contains my 
objects (checked all the boxes on the Manager colum).

Am I doing something wrong?
___
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] Backing out the Zope Hotfix 2005-10-09 that broke my zope 2.7.5

2005-10-13 Thread Peter Bengtsson
The trick is to do something like this which is what I did:

$ cd /usr/lib/zope-2.7.5/lib/python/
$ wget 
http://www.zope.org/Products/Zope/Hotfix_2005-10-09/security_alert/Hotfix_2005-10-09.tar.gz
$ tar -zxvf Hotfix_2005-10-09.tar.gz
$ chmod -R 644 .
$ chmod -R +X .

That's on a debian to. YMMV.

2005/10/13, John Schinnerer <[EMAIL PROTECTED]>:
> Aloha,
>
> FWIW here's what I found while backing out the hotfix on my zope 2.7.5:
>
> The hotfix-installed files are set to an owner, group and perms that do
> not work with an existing install (zope fails to start up
> completely/correctly).  I don't know if there are other problems also,
> but that was the relevant issue for me.
>
> More importantly, and more annoyingly for trying to back out, the
> owner, group and perms for the Products folder is altered to the same
> dysfunctional settings!
>
> I use debian, so I simply tried to reinstall the zope2.7 debian package
> to get the pre-hotfix files back.
> First I got some explicit errors on the hotfix-installed files that
> pointed me to the owner/group/perms problems with those.
>
> Then the debian package *appeared* to install, but zope still failed to
> actually start once installed and configured.
>
> It took me a while to notice that the owner/group/perms on the Products
> folder itself had been changed to the same settings, blocking
> correct/complete reinstall of the original files.
>
> Unfortunately the package install didn't raise any errors on this.
>
> Once I fixed the messed-up perms on the Products folder and did the
> install again, all was well.
>
> I put this info on the hotfix alert comments also.
>
> John S.
>
> --- John Schinnerer <[EMAIL PROTECTED]> wrote:
>
> > Aloha,
> >
> > I just applied the below hotfix as directed to a zope 2.7.5
> > installation on my development machine.
> >
> > It broke something bad, now the browser just says
> >
> > The connection was refused when attempting to contact localhost:9673
> >
> > I cannot access the ZMI nor any site pages, not on localhost:9673 nor
> > on 127.0.0.1:9673
> >
> > That is the port it was installed and had been working on.
> > I did nothing but install the hotfix as directed on the linked page
> > below.
> >
> > I have completely restarted the machine.
> > At boot time the messages indicate that zope started fine, as usual.
> >
> > Any help appreciated, the sooner the better.
> >
> > thanks,
> > John S.
> >
> > --- Andreas Jung <[EMAIL PROTECTED]> wrote:
> >
> > > Hello,
> > >
> > > a security issue with the Docutils package coming with Zope 2.6 or
> > > higher
> > > has been discovered. Sites that expose reStructuredText
> > functionality
> > > to
> > > untrusted users (typically portal sites allowing registered users
> > to
> > > edit
> > > content) are possibly affected.
> > >
> > > Download location and installation are available from
> > >
> > >
> > http://www.zope.org/Products/Zope/Hotfix_2005-10-09/security_alert
> > >
> > > The hotfix is supposed to work with any Zope 2.7 and 2.8 version.
> > > It might work for Zope 2.6 and Python 2.1 but we can not give a
> > > guarantee
> > > since Zope 2.6 is no longer maintained. Plone sites do not seem to
> > be
> > >
> > > affected (there seems to be some additional code on top of Zope's
> > > reST implementation avoiding the failure) however this not a
> > > guarantee.
> > > The upcoming Zope 2.8.2 and 2.7.8 releases will also ship with the
> > > hotfix.
> > >
> > >
> > > Andreas Jung
> > >
> > > > ___
> > > Zope-Announce maillist  -  Zope-Announce@zope.org
> > > http://mail.zope.org/mailman/listinfo/zope-announce
> > >
> > >   Zope-Announce for Announcements only - no discussions
> > >
> > > (Related lists -
> > >  Users: http://mail.zope.org/mailman/listinfo/zope
> > >  Developers: http://mail.zope.org/mailman/listinfo/zope-dev )
> > >
> >
> >
> >
> >
> > __
> > Yahoo! Music Unlimited
> > Access over 1 million songs. Try it free.
> > http://music.yahoo.com/unlimited/
> > ___
> > 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 )
> >
>
>
>
>
>
> __
> 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
**   N

[Zope] Backing out the Zope Hotfix 2005-10-09 that broke my zope 2.7.5

2005-10-13 Thread John Schinnerer
Aloha,

FWIW here's what I found while backing out the hotfix on my zope 2.7.5:

The hotfix-installed files are set to an owner, group and perms that do
not work with an existing install (zope fails to start up
completely/correctly).  I don't know if there are other problems also,
but that was the relevant issue for me.

More importantly, and more annoyingly for trying to back out, the
owner, group and perms for the Products folder is altered to the same
dysfunctional settings!

I use debian, so I simply tried to reinstall the zope2.7 debian package
to get the pre-hotfix files back.
First I got some explicit errors on the hotfix-installed files that
pointed me to the owner/group/perms problems with those.

Then the debian package *appeared* to install, but zope still failed to
actually start once installed and configured.

It took me a while to notice that the owner/group/perms on the Products
folder itself had been changed to the same settings, blocking
correct/complete reinstall of the original files.

Unfortunately the package install didn't raise any errors on this.

Once I fixed the messed-up perms on the Products folder and did the
install again, all was well.

I put this info on the hotfix alert comments also.

John S.

--- John Schinnerer <[EMAIL PROTECTED]> wrote:

> Aloha,
> 
> I just applied the below hotfix as directed to a zope 2.7.5
> installation on my development machine.
> 
> It broke something bad, now the browser just says
> 
> The connection was refused when attempting to contact localhost:9673
> 
> I cannot access the ZMI nor any site pages, not on localhost:9673 nor
> on 127.0.0.1:9673
> 
> That is the port it was installed and had been working on.
> I did nothing but install the hotfix as directed on the linked page
> below.
> 
> I have completely restarted the machine.
> At boot time the messages indicate that zope started fine, as usual.
> 
> Any help appreciated, the sooner the better.
> 
> thanks,
> John S.
> 
> --- Andreas Jung <[EMAIL PROTECTED]> wrote:
> 
> > Hello,
> > 
> > a security issue with the Docutils package coming with Zope 2.6 or
> > higher 
> > has been discovered. Sites that expose reStructuredText
> functionality
> > to
> > untrusted users (typically portal sites allowing registered users
> to
> > edit 
> > content) are possibly affected.
> > 
> > Download location and installation are available from
> > 
> >   
> http://www.zope.org/Products/Zope/Hotfix_2005-10-09/security_alert
> > 
> > The hotfix is supposed to work with any Zope 2.7 and 2.8 version.
> > It might work for Zope 2.6 and Python 2.1 but we can not give a
> > guarantee 
> > since Zope 2.6 is no longer maintained. Plone sites do not seem to
> be
> > 
> > affected (there seems to be some additional code on top of Zope's
> > reST implementation avoiding the failure) however this not a
> > guarantee.
> > The upcoming Zope 2.8.2 and 2.7.8 releases will also ship with the
> > hotfix.
> > 
> > 
> > Andreas Jung
> > 
> > > ___
> > Zope-Announce maillist  -  Zope-Announce@zope.org
> > http://mail.zope.org/mailman/listinfo/zope-announce
> > 
> >   Zope-Announce for Announcements only - no discussions
> > 
> > (Related lists - 
> >  Users: http://mail.zope.org/mailman/listinfo/zope
> >  Developers: http://mail.zope.org/mailman/listinfo/zope-dev )
> > 
> 
> 
> 
>   
> __ 
> Yahoo! Music Unlimited 
> Access over 1 million songs. Try it free.
> http://music.yahoo.com/unlimited/
> ___
> 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 )
> 





__ 
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 )