[Zope-dev] Zope tests: 8 OK

2006-01-28 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Fri Jan 27 12:01:01 2006 UTC to Sat Jan 28 12:01:01 2006 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Fri Jan 27 21:04:35 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-January/004114.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Jan 27 21:06:05 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-January/004115.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Jan 27 21:07:35 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-January/004116.html

Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Fri Jan 27 21:09:06 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-January/004117.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Fri Jan 27 21:10:36 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-January/004118.html

Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Fri Jan 27 21:12:06 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-January/004119.html

Subject: OK : Zope-2_9-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Fri Jan 27 21:13:36 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-January/004120.html

Subject: OK : Zope-trunk Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Fri Jan 27 21:15:06 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-January/004121.html

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


Re: [Zope] Error importing objects 2.8 2.7

2006-01-28 Thread Andreas Jung



--On 27. Januar 2006 22:32:07 +0100 Dieter Maurer [EMAIL PROTECTED] 
wrote:



Andreas Jung wrote at 2006-1-27 07:04 +0100:

...
Importing stuff from a new Zope version into an older Zope version was
_never_ a supported feature. Only import between _identical_ versions.
Anything else makes little sense and is unsupported.


Of course, you might be happy when you can import into a newer Zope
version from an older one. At least, that makes some sense :-)



Of course we would be happy if we could do that. But export/import was 
never designed to deal with migration issue. This is very much an 
application side problem. Btw. Jim has written a generations module which 
looks like a promising framework to deal with implicit migrations in a sane 
way.


-aj



pgpilPy98CwYt.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] Yet another newbie question (file upload and python scripts)

2006-01-28 Thread Janusz Zamecki
Hi, after googling and RTFM I have no other option but ask you for help.

I have the following DTML document:

dtml-var standard_html_header
form action=3DcheckTheFile method=3Dpost enctype=3Dmultipart/form-d=
ata
Select the file:
input type=3Dfile name=3Dthe_file
input type=3Dsubmit name=3Dgo value=3DNext 
/form
dtml-var standard_html_footer


And here is the checkTheFile python script:
## Script (Python) checkTheFile
##bind container=3Dcontainer
##bind context=3Dcontext
##bind namespace=3D
##bind script=3Dscript
##bind subpath=3Dtraverse_subpath
##parameters=3D
##title=3D
##
# Import a standard function, and get the HTML request and response objec=
ts.
from Products.PythonScripts.standard import html_quote
request =3D container.REQUEST
RESPONSE =3D  request.RESPONS


filename=3Dhtml_quote(request.form['the_file'].filename)
context.fs.rpt.manage_addFile(filename, request.form['the_file'],
content_type=3Dtext/xml)
# the next line does'n work:
file_content=3Drequest.form['the_file'].read()
# EOF

I need to temporary save uploaded file then I have to validate it. But
I've received the following error message:

Site error:
Error Type: AttributeError
Error Value: read

I've tested it on zope 2.7.7 and 2.9.0 on suse 10.0. (python 2.4.1).

So, It is obvious to me that I've made a mistake, but I have no idea
where it is?

I hope that someone could show me the right way

Best regards to all,

Janusz



signature.asc
Description: OpenPGP digital 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 and OAI-PMH

2006-01-28 Thread kit blake
2006/1/27, Luciano Ramalho [EMAIL PROTECTED]:
 I've been assigned to integrate an existing academic portal in Plone
 with the OAI-PMH protocol as a data provider. Searching through this
 list I found the message below, but no response.

 On 2/4/05, Yuri [EMAIL PROTECTED] wrote:
  There are several (at least two...) products to manage OAI with
  Zope. Can someone share his experiences in this list? Thanks :)

 The products I've found were:

 - OAI Pack from Infrae
 http://www.infrae.com/products/oaipack

 - ZOpenArchives from Pentila
 http://www.pentila.com/produits/ZOpenArchives

 Is anyone here using these (or other) products to implement OAI in
 Zope or Plone? Which is the more actively supported product?

Hi Luciano,
The OAI Pack product is actively supported (I don't whether it's 'more' :-)

We've had contact with the ZOpenArchives guys. AFAIK, the main
functional difference is ZOpenArchives provides storage for the
'server' in the ZODB, whereas we have assumed (and built) separate
storage servers for the documents, and implemented the
harvesting/search in Zope.

Currently we're completing a Document Library application, written in
Zope3, that supports metadata harvesting with OAI-PMH. This was
presented at the PloneConf in Vienna in september. It'll be released
in the next month or so.
kit


--
kit BLAKE
Infrae · infrae.com · +31 10 243 7051
Hoevestraat 10 · 3033GC · Rotterdam · The Netherlands
___
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] Yet another newbie question (file upload and python scripts)

2006-01-28 Thread David




Janusz Zamecki wrote:

  Hi, after googling and RTFM I have no other option but ask you for help.

I have the following DTML document:

dtml-var standard_html_header
form action="" method=3D"post" enctype=3D"multipart/form-d=
ata"
Select the file:
input type=3D"file" name=3D"the_file"
input type=3D"submit" name=3D"go" value=3D"Next "
/form
dtml-var standard_html_footer


And here is the checkTheFile python script:
## Script (Python) "checkTheFile"
##bind container=3Dcontainer
##bind context=3Dcontext
##bind namespace=3D
##bind script=3Dscript
##bind subpath=3Dtraverse_subpath
##parameters=3D
##title=3D
##
# Import a standard function, and get the HTML request and response objec=
ts.
from Products.PythonScripts.standard import html_quote
request =3D container.REQUEST
RESPONSE =3D  request.RESPONS


filename=3Dhtml_quote(request.form['the_file'].filename)
context.fs.rpt.manage_addFile(filename, request.form['the_file'],
content_type=3D"text/xml")
# the next line does'n work:
file_content=3Drequest.form['the_file'].read()
# EOF

I need to temporary save uploaded file then I have to validate it. But
I've received the following error message:

Site error:
Error Type: AttributeError
Error Value: read

I've tested it on zope 2.7.7 and 2.9.0 on suse 10.0. (python 2.4.1).

So, It is obvious to me that I've made a mistake, but I have no idea
where it is?

I hope that someone could show me the right way

Best regards to all,

Janusz

  
  

  

Janusz,

Zope objects of meta-type FILE do not have a read(). But with python
there always is a way, eg

ListOfLines = str(context.someFileObject).split('\n') # if its a
delimited file, this has worked for me in the past

for line in listOfLines:
 doValidations(line)

?
David 






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


Re: [Zope] Yet another newbie question (file upload and python scripts)

2006-01-28 Thread Andreas Jung



--On 28. Januar 2006 11:20:12 -0800 David [EMAIL PROTECTED] wrote:


---





Janusz,

Zope objects of meta-type FILE do not have a read().  But with python
there always is a way, eg


There is no meta-type FILE but only File. But this does not matter in this 
case since an uploaded file *does* have a read() method. The code looks 
mostly ok. I would look directly at the REQUEST object to figure out what 
the request really contains.



-aj

pgp9w4kR7WBK3.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] Yet another newbie question (file upload and python scripts)

2006-01-28 Thread Dieter Maurer
Janusz Zamecki wrote at 2006-1-28 10:30 +0100:
Hi, after googling and RTFM I have no other option but ask you for help.

I have the following DTML document:

dtml-var standard_html_header
form action=3DcheckTheFile method=3Dpost enctype=3Dmultipart/form-d=
ata
Select the file:
input type=3Dfile name=3Dthe_file
input type=3Dsubmit name=3Dgo value=3DNext 
/form
dtml-var standard_html_footer


And here is the checkTheFile python script:
## Script (Python) checkTheFile
##bind container=3Dcontainer
##bind context=3Dcontext
##bind namespace=3D
##bind script=3Dscript
##bind subpath=3Dtraverse_subpath
##parameters=3D
##title=3D
##
# Import a standard function, and get the HTML request and response objec=
ts.
from Products.PythonScripts.standard import html_quote
request =3D container.REQUEST
RESPONSE =3D  request.RESPONS


filename=3Dhtml_quote(request.form['the_file'].filename)
context.fs.rpt.manage_addFile(filename, request.form['the_file'],
content_type=3Dtext/xml)
# the next line does'n work:
file_content=3Drequest.form['the_file'].read()
# EOF

I need to temporary save uploaded file then I have to validate it. But
I've received the following error message:

Site error:
Error Type: AttributeError
Error Value: read

Whenever you get an Error, you should look at the traceback (to
be found in your error_log in the Zope Root Folder).
It tells you where the error occurred.


The code you show above should not result in an AttributeError: read.

However, it has some other problems:

  *  manage_addFile has read the uploaded file; after the call,
 it is positioned at its end.
 Your read will therefore always return ''.

 You should call a seek(0) before you try to read the file again.

  *  Your code is less well readable than possible.
 This could be improved by a definition
 file = request.form['the_file'] and than using file
 rathen than request.form['the_file'] over and over again.


-- 
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] Error importing objects 2.8 2.7

2006-01-28 Thread Dieter Maurer
Andreas Jung wrote at 2006-1-28 09:04 +0100:


--On 27. Januar 2006 22:32:07 +0100 Dieter Maurer [EMAIL PROTECTED] 
wrote:

 Andreas Jung wrote at 2006-1-27 07:04 +0100:
 ...
 Importing stuff from a new Zope version into an older Zope version was
 _never_ a supported feature. Only import between _identical_ versions.
 Anything else makes little sense and is unsupported.

 Of course, you might be happy when you can import into a newer Zope
 version from an older one. At least, that makes some sense :-)


Of course we would be happy if we could do that. But export/import was 
never designed to deal with migration issue.

Export/import is essentially what the ZODB does all the time.

If export/import does not work between given Zope versions, it is quite
likely that the same Zope versions will have difficulties with
storages exchange -- and this *IS* a migration issue, Zope should
be concerned with (and not the applications).

If it does, export/import will simply follow (in most cases).


-- 
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: Error importing objects 2.8 2.7

2006-01-28 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dieter Maurer wrote:
 Andreas Jung wrote at 2006-1-28 09:04 +0100:
 

--On 27. Januar 2006 22:32:07 +0100 Dieter Maurer [EMAIL PROTECTED] 
wrote:


Andreas Jung wrote at 2006-1-27 07:04 +0100:

...
Importing stuff from a new Zope version into an older Zope version was
_never_ a supported feature. Only import between _identical_ versions.
Anything else makes little sense and is unsupported.

Of course, you might be happy when you can import into a newer Zope
version from an older one. At least, that makes some sense :-)


Of course we would be happy if we could do that. But export/import was 
never designed to deal with migration issue.
 
 
 Export/import is essentially what the ZODB does all the time.
 
 If export/import does not work between given Zope versions, it is quite
 likely that the same Zope versions will have difficulties with
 storages exchange -- and this *IS* a migration issue, Zope should
 be concerned with (and not the applications).
 
 If it does, export/import will simply follow (in most cases).

Agreed:  for forward-migration of data, Zope has historically tried
*very* hard to ensure that objects which had been created under an older
version of Zope would be unpicklable under a newer version:  we have
treated the exceptions as serious bugs (where the problem was not due to
third-party application code, anyway).

However, the original poster wants to be able to import a .zexp file
exported from a *newer* version of Zope into an *older* version.
Keeping that path open has *not* been a goal for Zope, and so the OP
needs to find another way to solve his problem.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD2/hz+gerLs4ltQ4RAjcnAKC8wR36zfc8Q5X8PduwYnWYr26tOgCdE0ca
GTQkMwmmhXM76Y67b3PBg7w=
=s9Qh
-END 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] Off Topic: Good linux editors?

2006-01-28 Thread David

Hi list,

I'm fairly new to Linux (ubuntu server version) and simply hate VIM. Nor 
do I want to mind meld with the complex EMACS.   I just wonder what 
Editors some of you prefer as you write stuff like external scripts, etc.


thx,

David

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

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


Re: [Zope] Off Topic: Good linux editors?

2006-01-28 Thread Dennis Allison

vim, emacs, ...

yu might try nano


On Sat, 28 Jan 2006, David wrote:

 Hi list,
 
 I'm fairly new to Linux (ubuntu server version) and simply hate VIM. Nor 
 do I want to mind meld with the complex EMACS.   I just wonder what 
 Editors some of you prefer as you write stuff like external scripts, etc.
 
 thx,
 
 David
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 

-- 

___
Zope 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 importing objects 2.8 2.7

2006-01-28 Thread Andreas Jung



--On 28. Januar 2006 20:34:06 +0100 Dieter Maurer [EMAIL PROTECTED] 
wrote:

Export/import is essentially what the ZODB does all the time.

If export/import does not work between given Zope versions, it is quite
likely that the same Zope versions will have difficulties with
storages exchange -- and this *IS* a migration issue, Zope should
be concerned with (and not the applications).


Possibly we are talking about different things. A most common mistake of
Zope especially Plone users is to think that export/import acts as a 
migration tool (export your Plone 2.0 site on system A and reimport it into 
a Plone 2.1 installation on system B). This does usually never work when 
the internal data structures have changes (you know that :-)). Supporting 
such migration support for Zope core was/is always a goal since we have the 
app (Zope) in our hands but we can not sell export/import as a universal 
migration tool. 3rd-party apps have to deal with that.


-aj

pgp5Md1HrQ98W.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 )