Re: [Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-25 Thread Tino Wildenhain
Am Sonntag, den 24.07.2005, 19:50 -0300 schrieb David Pratt:
> Hi Chris. I believe the purpose of ZTUtils are utility functions for 
> page templating. That said, the Iterator class could be more useful by 
> exposing its values based on its state -  the point I had made.  
> Versatility is the beautiful thing about python  - it rarely matters to 
> me what intention there is or may have been for a class so long as it 
> supplies the methods I am after.  In the end, there's really nothing 
> here that can't be solved with a simple tool and a bit of flexibility 
> on my part. Many thanks.
> 
> Regards,
> David
> 
> On Friday, July 22, 2005, at 02:08 PM, Chris Withers wrote:
> 
> > David Pratt wrote:
> >>> Ah, I see what you're after, something akin to an SQL sequence, 
> >>> right?
> >>> Well, Iterator ain't that ;-)
> >> I guess something like that but that is what an iterator does.
> >
> > Why makes you think ZTUtils Iterators were designed for this?
> >
> >> Well, by hand is not the solution either.  It is not as simple as 
> >> that since I am using portlets in CMF
> >
> > You meean portlets in Plone, right? ;-)
> >
> >> You can't just number them like 1,2,3 etc because you end up with 
> >> conflicts in tabindex values when your templates are rendered.
> >
> > So give them each their own numbers based on the worst case of all 
> > portlets being present on one page...
> >
> >> your ZPT (that doesn't require you to write one with all the security 
> >> bypasses to make it work).
> >
> > They are not "security bypasses", they are appropriate security 
> > declarations based on the work the ZTUtils code does when executing...
> >
> > Looks like you're on your own...

It looks like this part of the Iterator is just misdesigned:

def next(self):
if not (hasattr(self, '_next') or self._prep_next(self)):
return 0
self.index = i = self.nextIndex
self.nextIndex = i+1
self._advance(self)
return 1

IIRC, ZTUtils were written long before the python iterators became
standard. So the method name next was used and now clashes with
the standard iterator protocol.

It could be fixed but only if there is no product in the world using
it or all must be fixed before.

I propose: has_next() or something in place of it.

___
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: Getting a methods parent (in a product)

2005-07-25 Thread Chris Withers

Tres Seaver wrote:

The actual issue is that attribute access will break if you have an
unwrapped object;  'aq_parent(foo)' will return 'None' in that case.


AttributeError: aq_parent

AttributeEror: None has no attribute "myattribute"

Take your pick I guess ;-)

*grinz*

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] Token 'ATOM' required, 'and' found

2005-07-25 Thread Chris Withers

Peter Bengtsson wrote:
But, is there a more robust solution to this? 


The "correct" thing to do here is to write your own query parser, but 
that's a lot of hard work.


I just catch the two exceptions that the QueryParser can throw and 
return an empty result set.


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 )


[Zope] How to display unicode character given its code

2005-07-25 Thread Itai Tavor

Hi,

This is a bit OT but this list is the best place I know to ask it :)

I have a form which uses UTF-8, the text entered in the form then has  
to be converted to iso-2022-jp. If any character is entered that  
isn't valid for iso-2022-jp I get:


UnicodeError: ISO-2022-JP encoding error: invalid character \u2013

What I need to do is display the offending character in the error  
message. So the question is, how do I take the '2013' and display the  
appropriate character?


TIA, Itai
___
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: Token 'ATOM' required, 'and' found

2005-07-25 Thread Peter Bengtsson
Ok. Sounds like a plan. 
What I need to do if it happens is to escape all the operator words
like "and" "or" "not".
Any idea how I can do that?

On 7/25/05, Chris Withers <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson wrote:
> > But, is there a more robust solution to this? 
> 
> The "correct" thing to do here is to write your own query parser, but 
> that's a lot of hard work.
> 
> I just catch the two exceptions that the QueryParser can throw and 
> return an empty result set.
> 
> cheers,
> 
> Chris
> 
> -- 
> Simplistix - Content Management, Zope & Python Consulting
> - http://www.simplistix.co.uk
> 
> 


-- 
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] Re: Token 'ATOM' required, 'and' found

2005-07-25 Thread Jonathan


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

To: "Chris Withers" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, July 25, 2005 7:06 AM
Subject: [Zope] Re: Token 'ATOM' required, 'and' found


Ok. Sounds like a plan. 
What I need to do if it happens is to escape all the operator words

like "and" "or" "not".
Any idea how I can do that?


Not a zope solution (or issue), but how about using regex in python code?

Jonathan




On 7/25/05, Chris Withers <[EMAIL PROTECTED]> wrote:

Peter Bengtsson wrote:
> But, is there a more robust solution to this? 

The "correct" thing to do here is to write your own query parser, but 
that's a lot of hard work.


I just catch the two exceptions that the QueryParser can throw and 
return an empty result set.


cheers,

Chris

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





--
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 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: Token 'ATOM' required, 'and' found

2005-07-25 Thread Peter Bengtsson
> 
> > Ok. Sounds like a plan. 
> > What I need to do if it happens is to escape all the operator words
> > like "and" "or" "not".
> > Any idea how I can do that?
> 
> Not a zope solution (or issue), but how about using regex in python code?
> 
Finding the words I'm not worried about. What I don't know is _how_ to
escape the words.
If it was putting it in square brackets i _would_ do:

  q = q.replace('not','[not]')

Don't get hung up on that. What I'm after is the technique I can use
upon the QueryParser for "ignoring" these operator words.

-- 
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] Re: Token 'ATOM' required, 'and' found

2005-07-25 Thread Chris Withers

Peter Bengtsson wrote:

Don't get hung up on that. What I'm after is the technique I can use
upon the QueryParser for "ignoring" these operator words.


RTSL ;-)

QueryParser.py has a massive doc string at the top of it ;-)

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 )


[Zope] Zip upload in Photo-1.3.0 doesn't work

2005-07-25 Thread Martin Koekenberg








Hello,

 

Does anybody use the zip upload in the latest Photo
product (1.3.0) ?

 

There is a ftp bug in that release but is has a zip
upload feature (that also doesn’t work with me).

 

I use Zope 2.7.7 on a Red Hat fedora core 4.

 

Thanks for the help.

 

Martin Koekenberg

 

 






___
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] Exception in Zope 2.8.0

2005-07-25 Thread Pascal Peregrina
Hi,
 
Just got this exception at startup :
  File
"/lmn/build/Frontier/20050618/opt/Zope-2.8.0-final/lib/python/ZODB/FileStora
ge/FileStorage.py", line 1733, in read_index
if prev:
NameError: global name 'prev' is not defined

My Data.fs may be corrupted, but this is not the point : looking at the
source code, I think it should be "h.prev" and not "prev" (in the if
statement).
 
Pascal


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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: Exception in Zope 2.8.0

2005-07-25 Thread Peter Bengtsson
Then file a bug report on the collector. If you can, include steps on
how to reproduce it. NameErrors just shouldn't happen in a tested
code.

On 7/25/05, Pascal Peregrina <[EMAIL PROTECTED]> wrote:
> Hi,
>  
> Just got this exception at startup :
>   File
> "/lmn/build/Frontier/20050618/opt/Zope-2.8.0-final/lib/python/ZODB/FileStora
> ge/FileStorage.py", line 1733, in read_index
> if prev:
> NameError: global name 'prev' is not defined
> 
> My Data.fs may be corrupted, but this is not the point : looking at the
> source code, I think it should be "h.prev" and not "prev" (in the if
> statement).
>  
> Pascal
> 
> 
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> 
> www.mimesweeper.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 )


Re: [Zope] Traceback Lines for Send Mail Error

2005-07-25 Thread Asad Habib
Well, nothing has changed in the mail server setup so I don't know why
this error is being thrown. Where can I access smtplib (I cannot locate
this Python library in my Zope hierarchy)? Someone else also reported
receiving this error as I discovered on Google but the issue was not
resolved. Any help would be appreciated. Thanks.

- Asad


On Sun, 24 Jul 2005, Dieter Maurer wrote:

> Asad Habib wrote at 2005-7-22 09:19 -0400:
> >If it helps, the last lines in the traceback are as follows:
> >
> >Module DocumentTemplate.DT_String, line 474, in __call__
> >Module Products.MailHost.SendMailTag, line 116, in render
> >Module Products.MailHost.MailHost, line 125, in send
> >Module Products.MailHost.MailHost, line 144, in _send
> >Module smtplib, line 254, in __init__
> >gaierror: (7, 'No address associated with nodename')
>
> This error comes from your mail server.
> Checks its (the mail server's) documentation to make sense of it.
>
>
> --
> Dieter
>
___
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: Exception in Zope 2.8.0

2005-07-25 Thread Pascal Peregrina
Done (issue #1849) 

-Original Message-
From: Peter Bengtsson [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2005 13:51
To: Pascal Peregrina
Cc: zope@zope.org
Subject: Re: Exception in Zope 2.8.0

Then file a bug report on the collector. If you can, include steps on how to
reproduce it. NameErrors just shouldn't happen in a tested code.

On 7/25/05, Pascal Peregrina <[EMAIL PROTECTED]> wrote:
> Hi,
>  
> Just got this exception at startup :
>   File
> "/lmn/build/Frontier/20050618/opt/Zope-2.8.0-final/lib/python/ZODB/Fil
> eStora ge/FileStorage.py", line 1733, in read_index
> if prev:
> NameError: global name 'prev' is not defined
> 
> My Data.fs may be corrupted, but this is not the point : looking at 
> the source code, I think it should be "h.prev" and not "prev" (in the 
> if statement).
>  
> Pascal
> 
> 
> **
> This email and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they 
> are addressed. If you have received this email in error please notify 
> the system manager.
> 
> This footnote also confirms that this email message has been swept by 
> MIMEsweeper for the presence of computer viruses.
> 
> www.mimesweeper.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] working with urls

2005-07-25 Thread Nicholas Wieland
First of all thanks everyone for the help, I've resolved my problems one after the other thanks to the suggestions I've found here.
 
Now I'm rewriting urls by substituting the href attribute with custom data, and everything works fine.
What I'd like is having an url like: myproduct/generate/20050301/PG2, and actually that's exactly what I've got. This url will make my app generate a pdf report for the ref_date 2005/03/01 and code PG2 (ref_date and code are internal data).
Zope obviously maps the url as an object, but that's not what I want: I want to parse the url and use the ref_date and code data inside a generate method.
Is it possible inside Zope without mod_rewriting and similar stuff ? I don't like querystring, the resulting url would be too long and difficult to paste.
I know that this is not the way Zope works ...
 
TIA,
  ngw 
		Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___
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] working with urls

2005-07-25 Thread Jonathan



Why don't you identify the variable data portion of 
the urls you are building as standard http-type arguments:
 
eg.    http://www.myweb.com/amethod?var1=val1&var2=val2...
 
This way var1, var2 etc will be accessible to your 
method as entries in REQUEST.
 
 
Jonathan

  - Original Message - 
  From: 
  Nicholas Wieland 
  To: zope@zope.org 
  Sent: Monday, July 25, 2005 9:39 AM
  Subject: [Zope] working with urls
  
  First of all thanks everyone for the help, I've resolved my problems one 
  after the other thanks to the suggestions I've found here.
   
  Now I'm rewriting urls by substituting the href attribute with custom 
  data, and everything works fine.
  What I'd like is having an url like: myproduct/generate/20050301/PG2, and 
  actually that's exactly what I've got. This url will make my app generate a 
  pdf report for the ref_date 2005/03/01 and code PG2 (ref_date and code 
  are internal data).
  Zope obviously maps the url as an object, but that's not what I want: I 
  want to parse the url and use the ref_date and code data inside a generate 
  method.
  Is it possible inside Zope without mod_rewriting and similar stuff ? 
  I don't like querystring, the resulting url would be too long and 
  difficult to paste.
  I know that this is not the way Zope works ...
   
  TIA,
    ngw 
  
  
  Yahoo! 
  Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
  
  

  ___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 
  )
___
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] working with urls

2005-07-25 Thread Nicholas Wieland


Because it's a bit ugly - my url will grow a lot, because I have to include the variable name. It's also really simple to make the product generate a PDF if the user know the ref_date and code, without playing with variable names.
 
Obviously if it's not possible I will generate a normal querystring, no problem at all, I'm just curious to know if it's possible to have urls like in ruby on rails :)
 
TIA,
  ngwJonathan <[EMAIL PROTECTED]> ha scritto: 




Why don't you identify the variable data portion of the urls you are building as standard http-type arguments:
 
eg.    http://www.myweb.com/amethod?var1=val1&var2=val2...
 
This way var1, var2 etc will be accessible to your method as entries in REQUEST.
 
 
Jonathan

- Original Message - 
From: Nicholas Wieland 
To: zope@zope.org 
Sent: Monday, July 25, 2005 9:39 AM
Subject: [Zope] working with urls

First of all thanks everyone for the help, I've resolved my problems one after the other thanks to the suggestions I've found here.
 
Now I'm rewriting urls by substituting the href attribute with custom data, and everything works fine.
What I'd like is having an url like: myproduct/generate/20050301/PG2, and actually that's exactly what I've got. This url will make my app generate a pdf report for the ref_date 2005/03/01 and code PG2 (ref_date and code are internal data).
Zope obviously maps the url as an object, but that's not what I want: I want to parse the url and use the ref_date and code data inside a generate method.
Is it possible inside Zope without mod_rewriting and similar stuff ? I don't like querystring, the resulting url would be too long and difficult to paste.
I know that this is not the way Zope works ...
 
TIA,
  ngw 


Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3 



___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 )
		Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___
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] Traceback Lines for Send Mail Error

2005-07-25 Thread Asad Habib
Maurer, I am certain that this is a Zope issue that has not been figured
out as yet. I was even able to connect to my SMTP server via the Terminal
application on a Mac. Do I have any other options?

- Asad

___
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] Exception in Zope 2.8.0

2005-07-25 Thread Florent Guillaume
Pascal Peregrina  <[EMAIL PROTECTED]> wrote:
> Just got this exception at startup :
>   File
> "/lmn/build/Frontier/20050618/opt/Zope-2.8.0-final/lib/python/ZODB/FileStora
> ge/FileStorage.py", line 1733, in read_index
> if prev:
> NameError: global name 'prev' is not defined
> 
> My Data.fs may be corrupted, but this is not the point : looking at the
> source code, I think it should be "h.prev" and not "prev" (in the if
> statement).

Tim has already fixed this in the trunk.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [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] Traceback Lines for Send Mail Error

2005-07-25 Thread Florent Guillaume
Asad Habib  <[EMAIL PROTECTED]> wrote:
> Maurer, I am certain that this is a Zope issue that has not been figured
> out as yet. I was even able to connect to my SMTP server via the Terminal
> application on a Mac. Do I have any other options?

You should do a network trace to see what makes the SMTP server puke.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [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 )


[Zope] Zope API Help System not working?

2005-07-25 Thread Edmund Moseley

I am a newbie to Zope/Plone.

I am trying to view the Zope API via the Help System in the ZMI, but I get
prompted to login and my admin login does not work.

I'm pretty sure I downloaded the latest version of plone which I was led to
believe would have the latest version of zope & python:

Zope Version
(unreleased version, python 2.3.3, win32)
Python Version
2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)]
System Platform
win32

If I do not have the latest version of zope for my plone instance, how can i
upgrade?

Thanks for any help,

Ed.

___
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] Running more than one instance on windows often block each other

2005-07-25 Thread Tim Peters
[Sune B. Woeller]
>> ...
>> I can see (with the excellent (and free) 'Process
>> Explorer' from sysinternals) that the python
>> processes always opens port 1, and connects by
>> that port to themselves on another port (for
>> instance 2550).
 
[Dieter Maurer]
> You can find the relevant code in
> "ZServer.medusa.thread.select_trigger.trigger.__init__"
>
> In principle, the code should try all sockets between
> "1" down to "19950" and fail only when none of them
> could be bound to...

Yup.  ZODB has what looks like a copy/paste of this code, in
ZEO/zrpc/trigger.py.  I didn't realize where it came from originally
until you pointed out the Medusa code here.

Anyway, it so happens I rewrote ZEO's copy a few weeks ago, in ZODB
3.4.  The Windows part is much simpler there now.  I don't know why
the original might fail in the way Sune reported, but perhaps the
rewritten version would not.

Before:

# tricky: get a pair of connected sockets
host='127.0.0.1'
port=1
while 1:
try:
self.address=(host, port)
a.bind(self.address)
break
except:
if port <= 19950:
raise BindError, 'Cannot bind trigger!'
port=port - 1

a.listen (1)
w.setblocking (0)
try:
w.connect (self.address)
except:
pass
r, addr = a.accept()
a.close()
w.setblocking (1)
self.trigger = w

After:

# Specifying port 0 tells Windows to pick a port for us.
a.bind(("127.0.0.1", 0))
connect_address = a.getsockname()  # assigned (host, port) pair
a.listen(1)
w.connect(connect_address)
r, addr = a.accept()  # r becomes asyncore's (self.)socket
a.close()
self.trigger = w
___
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: ZTUtils.Iterator value in ZPT

2005-07-25 Thread David Pratt
New methods on the iterator would do the trick.  I had suggested 
currval and nextval or similar - two or three simple methods would 
increase the versatility of the Iterator class for a variety of things. 
Is there interest in adding new methods to ZTUtils to expose these 
values?  It seems to fit the purpose of ZTUtils and would save making 
another tool at site or portal level.  The fact is it doesn't have to 
be a portal / portlets type of situation to benefit from this. It is 
not CMF specific in the least and would be useful in any multi column 
layout using ZPT where you need values for tabindex attributes without 
hand coding (particularly when your content is dynamic).


If there is no interest, I'll leave this alone and carry on with a 
portal tool for my CMF work instead.  ZTUtils is really core Zope issue 
so if there is interest, I can create a few methods but need some 
direction on what to do with them afterwards.


Regards,
David

On Monday, July 25, 2005, at 06:03 AM, Tino Wildenhain wrote:



It looks like this part of the Iterator is just misdesigned:

def next(self):
if not (hasattr(self, '_next') or self._prep_next(self)):
return 0
self.index = i = self.nextIndex
self.nextIndex = i+1
self._advance(self)
return 1

IIRC, ZTUtils were written long before the python iterators became
standard. So the method name next was used and now clashes with
the standard iterator protocol.

It could be fixed but only if there is no product in the world using
it or all must be fixed before.

I propose: has_next() or something in place of it.


___
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] Traceback Lines for Send Mail Error

2005-07-25 Thread Florent Guillaume

Please stay on the list.

I meant a real tcp trace, like ethereal.


On 25 Jul 2005, at 16:22, Asad Habib wrote:


Hello. I used traceroute and it did not return any errors.

- Asad


On Mon, 25 Jul 2005, Florent Guillaume wrote:



Asad Habib  <[EMAIL PROTECTED]> wrote:

Maurer, I am certain that this is a Zope issue that has not been  
figured
out as yet. I was even able to connect to my SMTP server via the  
Terminal

application on a Mac. Do I have any other options?



You should do a network trace to see what makes the SMTP server puke.

Florent




--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [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] Added Product Doesn't Show Up In ZMI

2005-07-25 Thread abgillette
> > I'm trying to get the Issue Dealer
> > (http://www.nidelven-it.no/products/issue_dealer) product up-and-running
> > on my Zope install (FreeBSD 4.11, Zope 2.7.1, Python 2.3.4). According
> > to the Issue Dealer docs, I should simply be able to unzip it into the
> > Products directory, restart Zope, and go, just like normal.
> >
> > I've done this, however, and nothing happens. Issue Dealer doesn't show
> > up in /Control_Panel/Products, or the [Add] dropdown. No broken
> > products, no nothing.
> >
> > Nothing looks at all unusual in the Products directory on the file
> > system.
> >
> > I've tried rebooting the machine and restarting from the ZMI, to no
> > avail.
> 
> Make sure that you have a '__init__.py' file in the top level directory
> of 

IssueDealer installs several folders in the Products subdirectory:

Products
   |
   > IssueDealer
   |
   > IssueDealerWebLog
   |
   > IssueDealerEpoz
   |
   > IssueDealerWebLogAddOn
   |
   > IssueDealerWebDAVPublisher
   |
   > IssueDealerFAQAddOn
   |
   > HTMLTools

Each of these directories has its own '__init__.py'.

> the Issue Dealer subdirectory tree, and also check to see if there are
> any 
> messages in the log file (.../zope/var/logger.log or something similar).

No errors are showing up in the logs files.

Any other ideas? I contacted the IssueDealer team last week, but haven't
heard a peep.

- Aaron
___
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: working with urls

2005-07-25 Thread Philipp von Weitershausen

Nicholas Wieland wrote:
First of all thanks everyone for the help, I've resolved my problems one 
after the other thanks to the suggestions I've found here.
 
Now I'm rewriting urls by substituting the href attribute with custom 
data, and everything works fine.
What I'd like is having an url like: myproduct/generate/20050301/PG2, 
and actually that's exactly what I've got. This url will make my app 
generate a pdf report for the ref_date 2005/03/01 and code PG2 (ref_date 
and code are internal data).
Zope obviously maps the url as an object, but that's not what I want: I 
want to parse the url and use the ref_date and code data inside a 
generate method.


You want to write a __bobo_traverse__ method for your class:

def __bobo_traverse__(self, REQUEST, name):
# do something with 'name' here.
return an_object_that_is_to_be_published

Philipp
___
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] Added Product Doesn't Show Up In ZMI

2005-07-25 Thread Jonathan


- Original Message - 
From: <[EMAIL PROTECTED]>

To: "Jonathan" <[EMAIL PROTECTED]>; 
Sent: Monday, July 25, 2005 12:03 PM
Subject: Re: [Zope] Added Product Doesn't Show Up In ZMI



> I'm trying to get the Issue Dealer
> (http://www.nidelven-it.no/products/issue_dealer) product 
> up-and-running

> on my Zope install (FreeBSD 4.11, Zope 2.7.1, Python 2.3.4). According
> to the Issue Dealer docs, I should simply be able to unzip it into the
> Products directory, restart Zope, and go, just like normal.
>
> I've done this, however, and nothing happens. Issue Dealer doesn't show
> up in /Control_Panel/Products, or the [Add] dropdown. No broken
> products, no nothing.
>
> Nothing looks at all unusual in the Products directory on the file
> system.
>
> I've tried rebooting the machine and restarting from the ZMI, to no
> avail.

Make sure that you have a '__init__.py' file in the top level directory
of


IssueDealer installs several folders in the Products subdirectory:

Products
  |
  > IssueDealer
  |
  > IssueDealerWebLog
  |
  > IssueDealerEpoz
  |
  > IssueDealerWebLogAddOn
  |
  > IssueDealerWebDAVPublisher
  |
  > IssueDealerFAQAddOn
  |
  > HTMLTools

Each of these directories has its own '__init__.py'.


the Issue Dealer subdirectory tree, and also check to see if there are
any
messages in the log file (.../zope/var/logger.log or something similar).


No errors are showing up in the logs files.

Any other ideas? I contacted the IssueDealer team last week, but haven't
heard a peep.


The only other suggestion I have is to dig thru the IssueDealer source code 
and try to debug it yourself (given that there is no help from the author). 
If you are not familiar with zope product development you can google for:


site:www.zope.org boring product
site:www.zope.org simple product

Warning: debugging someone else's product may not be a trivial exercise if 
you are not familiar with zope product development (and python)!


Jonathan


___
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] Added Product Doesn't Show Up In ZMI

2005-07-25 Thread Jo Meder
Am 25.07.2005, 18:03 Uhr
schrob [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

> Each of these directories has its own '__init__.py'.

Do these directories and the files in there have the correct
permissions set so that the user Zope runs as can access the files?

HTH

Jo.


-- 
internetmanufaktur jo- Berlin, Germany
  |||meder---fon: ++49-30-417 17 63 33
http://www.meder.de/ --- fax: ++49-30-417 17 63 45
Kollwitzstr. 75  mob: ++49-170- 2 98 89 97
10435 Berlin ---http://www.meder.de/keys/jo-pubkey.txt
___
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] Plone: storage, catologing and versioning

2005-07-25 Thread Rogério Atem de Carvalho
>> I have a few questions about Plone (in some extent CMF/Zope):
>>
>> 1)How to manipulate versioning in Plone? (like CPS does)
>> I know there is PLIP8, but it is still a proposal, isn't it?

>have a look at CMFEditions on svn.plone.org/collective . it is also
>published on plone.org site
>we have publieshed an alpha release, and hope to fix the remaining bug
>over the summer, please feel free to contribute. On
>sourceforge.net/projects/collective you can find the
>"collective-versioning" which we use to discuss on subject and
>coordinate the effort.

Ok, I will check this.

>> 2)How to store and catalog huge document collections?
>> -LocalFS + ZCatalog?
>what do you mean with "huge"?

In a first moment some tens of gigas (20 to 30 Gbs).
In two or three years, some 100, 200 Gb

>> -Implement mapping and indexing in a relational DB?

>google for shane's apelib or look int svn.plone.org/archetypes

Is APE stable?

> (I have also de ERP5's ZSQLCatalog option...)
>
>> 3)Is there any product or Plone plug-in that allows enhanced searches
>> through thesaurus or ontologies, or something like this?
>> I know there are Ontobroker and Gnowsys, but I would like
>> to have something simpler to work on top of Plone.

>nothing ready i think, but for a generic library that enables you to
>perform complex queries over a catalog google fro Dieter's AdvancedQuery
>product. Also, it is possible to implement ontologies in plone using
>Archetypes references and maybe using the Relations product (always from
>Archetypes svn o)

Interesting, I will also check this!

Thanks a lot,
--
Prof. Rogério Atem de Carvalho, D.Sc.
Gerente de Pesquisa - CEFET Campos


___
''O remetente desta mensagem é o responsável pelo seu conteúdo e
endereçamento. A utilização deste meio para fins que não aqueles
dispostos na Portaria nº 267, de 20 de outubro de 2003 da Direção
Geral do CEFET CAMPOS, é passível das sanções cabíveis, dispostas
nas normas internas para utilização de correio eletrônico e acesso
à Internet.''
___
Servidor de E-mail CEFET Campos

___
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: working with urls

2005-07-25 Thread Peter Bengtsson
> >  
> > Now I'm rewriting urls by substituting the href attribute with custom 
> > data, and everything works fine.
> > What I'd like is having an url like: myproduct/generate/20050301/PG2, 
> > and actually that's exactly what I've got. This url will make my app 
> > generate a pdf report for the ref_date 2005/03/01 and code PG2 (ref_date 
> > and code are internal data).
> > Zope obviously maps the url as an object, but that's not what I want: I 
> > want to parse the url and use the ref_date and code data inside a 
> > generate method.
> 
> You want to write a __bobo_traverse__ method for your class:
> 
>  def __bobo_traverse__(self, REQUEST, name):
>  # do something with 'name' here.
>  return an_object_that_is_to_be_published
> 
> Philipp

I prefer to use __before_publishing_traverse__(self, obj, REQUEST=None)

The IssueTrackerProduct (IssueTracker.py) uses this so that you can URLs like
/ListIssues/start-20/reverse-False 
instead of
/ListIssues?start=20&reverse=False 
but that is just slightly different from what you are after. 
Good luck

-- 
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] working with urls

2005-07-25 Thread Ken Ara
Simplest might be to point a Path Handler
(http://www.zope.org/Members/NIP/PathHandler) named
'generate' at your PDF generator script.

Also, a Script(Python) 'generate' containing:

return traverse_subpath

when called http://mysite.com/generate/foo/bar/baz
returns:

['foo', 'bar', 'baz']

This could be useful for the URL re-writing you want.

Ken

--- In [EMAIL PROTECTED], Peter Bengtsson
<[EMAIL PROTECTED]> wrote:
> > >  
> > > Now I'm rewriting urls by substituting the href
attribute with custom 
> > > data, and everything works fine.
> > > What I'd like is having an url like:
myproduct/generate/20050301/PG2, 
> > > and actually that's exactly what I've got. This
url will make my app 
> > > generate a pdf report for the ref_date
2005/03/01 and code PG2 (ref_date 
> > > and code are internal data).
> > > Zope obviously maps the url as an object, but
that's not what I want: I 
> > > want to parse the url and use the ref_date and
code data inside a 
> > > generate method.
> > 
> > You want to write a __bobo_traverse__ method for
your class:
> > 
> >  def __bobo_traverse__(self, REQUEST, name):
> >  # do something with 'name' here.
> >  return an_object_that_is_to_be_published
> > 
> > Philipp
> 
> I prefer to use __before_publishing_traverse__(self,
obj, REQUEST=None)
> 
> The IssueTrackerProduct (IssueTracker.py) uses this
so that you can URLs like
> /ListIssues/start-20/reverse-False 
> instead of
> /ListIssues?start=20&reverse=False 
> but that is just slightly different from what you
are after. 
> Good luck
> 
> -- 
> Peter Bengtsson, 
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.com

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
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 )


Re: [Zope] Re: Zope Foundation Update

2005-07-25 Thread Xavier Heymans
I would like to inform that ZEA is in the process to transfer the trademark to Zope Corporation. A number of actions will be taken including the preparation of the list of expenses to secure the trademark, and meetings with our trademark expert to work on the administrative details. We would like to emphasize that no action taken by Zope Europe Association are illegal from a European perspective. As said  earlier, our action was aimed at securing the mark stopping third party registrations. Best regards,Xavier HeymansCEO, Zope Europe AssociationOn 21-juil.-05, at 14:35, Hadar Pedhazur wrote:"George Donnelly" <[EMAIL PROTECTED]> wrote in message news:dbmpjp$kl8$[EMAIL PROTECTED]... ZC says: the marks were stolenZEA seems to be saying: the marks were registered defensively. I am amazed at how people pick and choose what to read andrepeat, and what to ignore. I will mix in a few quotes froma few posts responding to my note yesterday to highlightthis problem.After this post, unless someone makes a profound newstatement, I will remain silent, as many of you haverequested, and complete the trademark challenge processthrough the official channels that have already begun.George, others have already replied to this, but Rob haswritten about this as well before, so I'm surprised thatthis is still a question. A defensive registration of _our_trademark should have been _explicitly_ called to ourattention. In fact, any reasonable company would havealerted us to any specific danger, and asked us if _we_intended to register our trademarks in the appropriatejurisdiction.Beyond that point, _we_ are the first registrants of theZOPE trademark in WIPO. ZEA registered our LOGO, not theword ZOPE, which we registered _before_ they registered theLOGO. So, everyone, please pay attention. We did _not_ignore our trademark rights in Europe. We registered ourbase trademark, the word ZOPE, in a number of countries inEurope. ZEA then registered our LOGO (taken from ourwebsite), including the name ZOPE in it (which we hadalready registered).I am truly unsure as to how to make this point any clearer. My read on this is that there is a serious communication problem goingon here between the lines. Why doesn't Paul come out and state what theZEA position is? Why are ZC's words so angry? There isn't really a communication problem here (though itwould wonderful if there was). There is a backtracking and arewriting of history going on, because ZEA got caught withtheir hands in our cookie jar. They could have settled thisincredibly quietly and quickly. Instead, they chose a paththat has led us here.We could have fought it silently too, so it's 100% true thatwe are the ones that brought this fight into the public. Onthe other hand, I can't imagine what would have happened ifthis private battle dragged on until January, and then wegot beaten up for missing the launch date on the Foundation,and only then alerted the community as to what was going on.So, we did what we thought was the most prudent thing, andalerted the community 2 days after we initiated thechallenge to their registration. I don't know how we couldhave been more transparent about it. ZC saying the marks were stolen seems a little over the top. What if ZEAregistered them defensively? if that's possible then ZEA should be giventhen  benefit of the doubt and not be called a thief. If there was aneed to register them to protect "zope", then why didn't ZC do it? Read the above response again (and again if necessary). Moreimportantly, ask yourself why ZEA admitted to us during aphone call that they believe that there were deals that theycould not have won if they didn't control the mark? Nowextend that thought one more inch and ask yourself how theZope-based companies that they competed against in Europewould feel if they knew that this was a commercial leveragepoint for ZEA in winning against their bid?!?!?And again, read the above to see that our registration of themark "ZOPE" predates theirs. Everybody needs to calm down, stop insulting each other and stopbroadcasting this problem to the whole world on zope-announce (forexample). Its making us all look  childish. Indeed, we do look childish, and I'm perhaps _more_ to blamefor that escalation than others. That's why I will try tokeep this as my last communication (at least for a while) onthis topic. That said, a number of people responded sayingthat they were not only glad to be made aware of thisproblem, but were surprised that they didn't know about itsooner.The rhetoric (mine as well!) is louder than it should be,but I believe the issue(s) definitely needed to be aired, asit's utterly obvious that even the more basic of the "facts"are still misunderstood by a number of posters. As anexample, the repeated questioning of why we didn't registerour own marks in Europe, which we did. Making either side into the bad guy is not only innacurate but alsoinappropriate and is not conducive to building a community around thesoftware we all love 

Re: [Zope] Reg Zope service starting problem

2005-07-25 Thread Dieter Maurer
praba kar wrote at 2005-7-25 06:25 +0100:
> ...
>"/Programs/Zope/2.7.0/lib/python/Products/ZCatalog/IZCatalog.py",
>line 236, in ?
>__doc__ = IZCatalog.__doc__ + __doc__
>TypeError: unsupported operand type(s) for +:
>'NoneType' and 'NoneType'

".0" releases often have problems.

I recommend to switch to the latest "2.7" release (which is
2.7.7 or maybe even 2.7.8).

-- 
Dieter
___
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 API Help System not working?

2005-07-25 Thread Dieter Maurer
Edmund Moseley wrote at 2005-7-25 10:30 -0400:
>I am trying to view the Zope API via the Help System in the ZMI, but I get
>prompted to login and my admin login does not work.

Such problems are best analysed with the "VerboseSecurity" product.

Install it and report what it tells you.

-- 
Dieter
___
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] working with urls

2005-07-25 Thread Dieter Maurer
Nicholas Wieland wrote at 2005-7-25 15:39 +0200:
>Now I'm rewriting urls by substituting the href attribute with custom data, 
>and everything works fine.
>What I'd like is having an url like: myproduct/generate/20050301/PG2, and 
>actually that's exactly what I've got. This url will make my app generate a 
>pdf report for the ref_date 2005/03/01 and code PG2 (ref_date and code are 
>internal data).
>Zope obviously maps the url as an object, but that's not what I want

Have a look at "PythonScript"s "traverse_subpath" binding.

I would expect that you find a description in the Zope Book
(2.7 edition, online).


-- 
Dieter
___
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] Puzzling Import/Export problem

2005-07-25 Thread Dieter Maurer
Jim Washington wrote at 2005-7-23 16:09 -0400:
>He is attempting to copy an installation from one machine to another, 
>and upgrade Zope to 2.6.4.
>
>Exporting the product and instances works fine, but some object 
>instances will not import correctly.

Usually, it is much safer to just copy the storage file(s).

Export/Import is known to fail with ZClasses that inherit
from other ZClasses defined in a different product (which probably
is not your case).

>A product instance is a folderish object that contains other objects.  
>One particular folderish subobject will not import correctly; all the 
>others import fine.  The .zexp of the entire product instance, with 
>subitems, etc., imports OK, but the one folderish object shows up as 
>"broken" in the ZMI.

This usually means that its class could not be imported.

Have a look at Zope's "ClassFactory" and check why it is unable
to import/load the ZClass.

-- 
Dieter
___
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 display unicode character given its code

2005-07-25 Thread Dieter Maurer
Itai Tavor wrote at 2005-7-25 20:21 +1000:
>This is a bit OT but this list is the best place I know to ask it :)
>
>I have a form which uses UTF-8, the text entered in the form then has  
>to be converted to iso-2022-jp. If any character is entered that  
>isn't valid for iso-2022-jp I get:
>
>UnicodeError: ISO-2022-JP encoding error: invalid character \u2013
>
>What I need to do is display the offending character in the error  
>message.

I what encoding?

Obviously, you cannot use "ISO-2022-JP".
If you can handle "UTF-8", then use "unicode('\u2013').encode('utf-8')".

You can also use the "xmlcharref" error parameter for your
"encode(iso-2022-hp)". In this case, your character would 
become an XML character reference. They have the form
"–". Browsers usually are able to display them.

-- 
Dieter
___
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] Traceback Lines for Send Mail Error

2005-07-25 Thread Dieter Maurer
Asad Habib wrote at 2005-7-25 09:24 -0400:
>Well, nothing has changed in the mail server setup so I don't know why
>this error is being thrown.

I have been wrong. The message does not originate from your
mail server.

>Where can I access smtplib (I cannot locate
>this Python library in my Zope hierarchy)?

"smtplib" is part of the Python runtime library.

>Someone else also reported
>receiving this error as I discovered on Google but the issue was not
>resolved. Any help would be appreciated.

Looking at the "smtplib" source and your traceback reveals:

  "smtplib.SMTP.__init__" is trying to determine the
  local hostname. The code looks like this:

if local_hostname is not None:
self.local_hostname = local_hostname
else:
# RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and
# if that can't be calculated, that we should use a domain literal
# instead (essentially an encoded IP address like [A.B.C.D]).
fqdn = socket.getfqdn()
if '.' in fqdn:
self.local_hostname = fqdn
else:
# We can't find an fqdn hostname, so use a domain literal
addr = socket.gethostbyname(socket.gethostname())
# your exception is raised in the line above
self.local_hostname = '[%s]' % addr
  

This means that you local system is in a strange state.
Probably, it is unable to determine its hostname.

Try (in an interactive Python interpreter):

import socket
socket.gethostname()
socket.gethostbyname(socket.gethostname())


-- 
Dieter
___
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] Running more than one instance on windows often block each other

2005-07-25 Thread Dieter Maurer
Tim Peters wrote at 2005-7-25 10:36 -0400:
>Yup.  ZODB has what looks like a copy/paste of this code, in
>ZEO/zrpc/trigger.py.  I didn't realize where it came from originally
>until you pointed out the Medusa code here.
>
>Anyway, it so happens I rewrote ZEO's copy a few weeks ago, in ZODB
>3.4.  The Windows part is much simpler there now.
> 
>After:
>
># Specifying port 0 tells Windows to pick a port for us.
>a.bind(("127.0.0.1", 0))
>connect_address = a.getsockname()  # assigned (host, port) pair
>a.listen(1)
>w.connect(connect_address)
>r, addr = a.accept()  # r becomes asyncore's (self.)socket
>a.close()
>self.trigger = w

This may even be portable (not Windows specific).
At least, it works for Linux2.

In this case, we might get rid of the stupid code duplication...

-- 
Dieter
___
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] Traceback Lines for Send Mail Error

2005-07-25 Thread Asad Habib
Thanks Dieter. You hit the nail on the head. socket.gethostname() is not
returning the full canonical name of the machine. But how do I correct
this? Any idea?

- Asad


On Mon, 25 Jul 2005, Dieter Maurer wrote:

> Asad Habib wrote at 2005-7-25 09:24 -0400:
> >Well, nothing has changed in the mail server setup so I don't know why
> >this error is being thrown.
>
> I have been wrong. The message does not originate from your
> mail server.
>
> >Where can I access smtplib (I cannot locate
> >this Python library in my Zope hierarchy)?
>
> "smtplib" is part of the Python runtime library.
>
> >Someone else also reported
> >receiving this error as I discovered on Google but the issue was not
> >resolved. Any help would be appreciated.
>
> Looking at the "smtplib" source and your traceback reveals:
>
>   "smtplib.SMTP.__init__" is trying to determine the
>   local hostname. The code looks like this:
>
> if local_hostname is not None:
> self.local_hostname = local_hostname
> else:
> # RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and
> # if that can't be calculated, that we should use a domain literal
> # instead (essentially an encoded IP address like [A.B.C.D]).
> fqdn = socket.getfqdn()
> if '.' in fqdn:
> self.local_hostname = fqdn
> else:
> # We can't find an fqdn hostname, so use a domain literal
> addr = socket.gethostbyname(socket.gethostname())
> # your exception is raised in the line above
> self.local_hostname = '[%s]' % addr
>
>
> This means that you local system is in a strange state.
> Probably, it is unable to determine its hostname.
>
> Try (in an interactive Python interpreter):
>
> import socket
> socket.gethostname()
> socket.gethostbyname(socket.gethostname())
>
>
> --
> Dieter
> ___
> 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 )


Re: [Zope] getting atachments with python - pop3

2005-07-25 Thread J Cameron Cooper

Jonathan Salazar Santos wrote:

Hi, im making a email client in python for zope, but a im stopped
because i cant find the way to get the attacments with python, do you
have a idea how can i do this?, i have studied the email package
already but is a little confused.


A Python-specific list might be more on-topic.'

But look at the python modules:

http://python.org/doc/lib/module-email.html
http://python.org/doc/lib/module-mimetools.html

--jcc
--
"Building Websites with Plone"
http://plonebook.packtpub.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] Running more than one instance on windows often block each other

2005-07-25 Thread Tim Peters
[Tim Peters]
>> Yup.  ZODB has what looks like a copy/paste of this code, in
>> ZEO/zrpc/trigger.py.  I didn't realize where it came from originally
>> until you pointed out the Medusa code here.
>>
>> Anyway, it so happens I rewrote ZEO's copy a few weeks ago, in ZODB
>> 3.4.  The Windows part is much simpler there now.
>> 
>> After:
>>
>># Specifying port 0 tells Windows to pick a port for us.
>>a.bind(("127.0.0.1", 0))
>>connect_address = a.getsockname()  # assigned (host, port) pair
>>a.listen(1)
>>w.connect(connect_address)
>>r, addr = a.accept()  # r becomes asyncore's (self.)socket
>>a.close()
>>self.trigger = w
 
[Dieter Maurer]
> This may even be portable (not Windows specific).
> At least, it works for Linux2.

I believe it is portable, but the Unix version of this code doesn't
use sockets at all.  It uses a pipe instead.  A pipe can't be used on
Windows because the Windows select() works only with sockets, and
asyncore on Windows uses select().  I don't know if/why a pipe would
be better on Unix, but just assume that it is.  I do know that the
Windows version of this code used to leak sockets madly, for years. 
The pipe code is simpler still.

> In this case, we might get rid of the stupid code duplication...

Well, there are two kinds:

1. Massive code duplication between the "posix" and "not posix"
versions of the `trigger` classes.  I already refactored ZODB's copy
to eliminate that (most of the ZODB 3.4 trigger code is in a shared
base class now, and the "posix" and "not posix" versions override just
enough to make the pipe-versus-socket-pair distinction).

2. Massive code duplication between ZODB's copy and Medusa's.  Hmm. 
Since I refactored ZODB's copy, it's hard to tell that they have
anything in common anymore ;-)
___
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: Zope Foundation Update

2005-07-25 Thread Andrew Milton
+---[ Xavier Heymans ]--
| I would like to inform that ZEA is in the process to transfer the trademark to
| Zope Corporation. A number of actions will be taken including the preparation
| of the list of expenses to secure the trademark, and meetings with our
| trademark expert to work on the administrative details. 
| 
| We would like to emphasize that no action taken by Zope Europe Association are
| illegal from a European perspective. As said  earlier, our action was aimed at
| securing the mark stopping third party registrations. 
| 

You took someone else's work and claimed it as your own. This is the worst 
crime 
you can commit in the Open Source world. 

-- 
Andrew Milton
[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] How to display unicode character given its code

2005-07-25 Thread Itai Tavor

On 26/07/2005, at Tue 26/07 4:12AM, Dieter Maurer wrote:


Itai Tavor wrote at 2005-7-25 20:21 +1000:


This is a bit OT but this list is the best place I know to ask it :)

I have a form which uses UTF-8, the text entered in the form then has
to be converted to iso-2022-jp. If any character is entered that
isn't valid for iso-2022-jp I get:

UnicodeError: ISO-2022-JP encoding error: invalid character \u2013

What I need to do is display the offending character in the error
message.



I what encoding?

Obviously, you cannot use "ISO-2022-JP".
If you can handle "UTF-8", then use "unicode('\u2013').encode 
('utf-8')".


You can also use the "xmlcharref" error parameter for your
"encode(iso-2022-hp)". In this case, your character would
become an XML character reference. They have the form
"–". Browsers usually are able to display them.


Thanks, Dieter.

Couldn't get it to work, though... not sure why: unicode('\u2013')  
returns u'\\u2013', which is useless.


Just found the unichr method though. unichr(int('2013', 16)) does the  
job.


Itai

___
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] cpu performance zope/zeo

2005-07-25 Thread Srdan Zagorac

Hi

I need  a suggestion / advice regarding the  CPU options for the best  
ZOPE and ZEO performance. eg 32 vs 64 bits architecture,  single vs dual 
core, hyper threading.

Is there any bechmarks already posted on the web??

Thanks

--
-
Srdan Zagorac
Software Developer / Webmaster / DB Administrator
Bioengineering Institute
University of Auckland 
email: [EMAIL PROTECTED]

url: http://www.bioeng.auckland.ac.nz
ph: +64 9 373 7599 ext. 82046
fax: +64 9 367 7157
-

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