[Zope-dev] Zope Tests: 7 OK

2006-12-27 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Tue Dec 26 12:00:00 2006 UTC to Wed Dec 27 12:00:00 2006 UTC.
There were 7 messages: 7 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2.6 Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Tue Dec 26 21:14:57 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006908.html

Subject: OK : Zope-2.6 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Tue Dec 26 21:16:27 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006909.html

Subject: OK : Zope-2.7 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Tue Dec 26 21:17:57 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006910.html

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Tue Dec 26 21:19:27 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006911.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Tue Dec 26 21:20:57 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006912.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Tue Dec 26 21:22:27 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006913.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Tue Dec 26 21:23:57 EST 2006
URL: http://mail.zope.org/pipermail/zope-tests/2006-December/006914.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 )


[Zope] how to modify floder's attribute by script

2006-12-27 Thread nienfeng


I create a folder in ZMI, and add several attributes in it.
In the folder, I add a Script that modify the folder's attribute.
How should I do?







___
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 modify floder's attribute by script

2006-12-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 16:18:05 +0800 nienfeng [EMAIL PROTECTED] 
wrote:


 I create a folder in ZMI, and add several attributes in it.
 In the folder, I add a Script that modify the folder's attribute.
 How should I do?


http://plope.com/Books/2_7Edition/AppendixB.stx#2-279

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFkirsCJIWIbr9KYwRAp2/AKDBLjLlt9QkNmvbFEC0MF0kv2FFOgCeMc5M
KSrGHjhUzK7mZUM//CeNtcI=
=855v
-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 )


Re: [Zope] how to modify floder's attribute by script

2006-12-27 Thread nienfeng



nienfeng :



I create a folder in ZMI, and add several attributes in it.
In the folder, I add a Script that modify the folder's attribute.
How should I do?



I find it : manage_changeProperties()
but There are still something I don't know.

EX:
   Email/ (folder), has 3 properties: mTo, mFrom, mCC
 MailHost(Mailhost)
 set (Script Python)

   in set:
## Script (Python) set
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=  


print container.propertyItems()
# output:  [('title', ''), ('mTo', 'nienfeng@'), ('mFrom', 'nienfeng@'), 
('mCC', '')]

print container['MailHost'].propertyItems()
# output: still as same as above
print container['MailHost']
# output MailHost at MailHost

container.manage_changeProperties(mTo='testTo')
# It work
container['MailHost'].manage_changeProperties(smtp_host='testHost')
# It don't work and have not any ErrorMessage

What's wrong with the container['MailHost'].propertyItems()  and  
container['MailHost'].manage_changeProperties(smtp_host='testHost')


Thanks. 
by nienfeng

___
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] processing data problem

2006-12-27 Thread Maciej Wisniowski
 As I have mention some of the problem due to both methods I proposed, 
 I wish to aim to build a system that could keep everything web-based
 and at the same time process the source data on the user's computer
 instead of send large source file(such as the dbf) back to the server
 for process.
I think that sending huge files to the server just to do simple
processing is not a good solution. Maybe you should think
about a kind of browser plugin, applet, XUL etc. Maybe something
quite different like sharing database (dbf) between users or some
kind of data replication at the DBMS level?

 Just as you said, I could make an application for windows users,
 but I really want to keep everything web based and be multi-plateform.
With Python you may be multi-platform even without web based solutions.
Look at wxPython for example.

-- 
Maciej Wisniowski
___
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] usering module problem on zope 2.8.8

2006-12-27 Thread Allen Huang
I know I'm not suppose to use Z Class anymore but I really aren't familiar with 
make Products yet and I just want to do some quick result before I translate it 
into a product but it seem that something is different with Z Class in Zope 2.9 
and I couldn't make a Z Class like I use to do when I'm was using Zope 2.8.

Why is that?


- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Wednesday, December 27, 2006 3:03:52 PM
Subject: Re: [Zope] usering module problem on zope 2.8.8


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 26. Dezember 2006 20:05:41 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 zope 2.8.8 uses python 2.3.5
 but I want to use modules that will only work with python 2.4

 I've being adviced not to change runzope.bat file since it might disrupt
 functionalities of zope 2.8.8 designed for python 2.3.5. what should I do?

Use Zope 2.9 or Zope 2.10 that will require Python 2.4.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFkhrYCJIWIbr9KYwRAgtlAJ0a2fcP15hkbO6FX0yD9zrUSGGKyQCcCiPE
b1BfidjHojTfIXVdsx1Ui9c=
=khQQ
-END PGP SIGNATURE-

__
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] usering module problem on zope 2.8.8

2006-12-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 03:26:28 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I couldn't make a Z Class like I
 use to do when I'm was using Zope 2.8.


Why not? Where is your error description?

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFklqOCJIWIbr9KYwRAhK1AKCaei70217Ma7gMn/1bdCUBNl5ciQCff99b
KAMazCP5qofY2mIhe/OIetc=
=2Vxi
-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 )


Re: [Zope] usering module problem on zope 2.8.8

2006-12-27 Thread Jonathan
We have an application, which uses ZClasses,  (originally developed in Zope 
2.4) that is currently running in Zope 2.9.2, so you should be able to upgrade 
to Zope 2.9x in order to use python 2.4.   Zope 2.10x may cause some problems 
as CHANGES.txt indicates that ZClasses are deprecated as of zope 2.10.0.

If you have tried upgrading to 2.9x and have encountered errors, post the full 
traceback.


Jonathan


  - Original Message - 
  From: Allen Huang 
  To: Zope 
  Sent: Wednesday, December 27, 2006 6:26 AM
  Subject: Re: [Zope] usering module problem on zope 2.8.8


  I know I'm not suppose to use Z Class anymore but I really aren't familiar 
with make Products yet and I just want to do some quick result before I 
translate it into a product but it seem that something is different with Z 
Class in Zope 2.9 and I couldn't make a Z Class like I use to do when I'm was 
using Zope 2.8.

  Why is that?


  - Original Message 
  From: Andreas Jung [EMAIL PROTECTED]
  To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
  Sent: Wednesday, December 27, 2006 3:03:52 PM
  Subject: Re: [Zope] usering module problem on zope 2.8.8


  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1



  - --On 26. Dezember 2006 20:05:41 -0800 Allen Huang [EMAIL PROTECTED] wrote:

   zope 2.8.8 uses python 2.3.5
   but I want to use modules that will only work with python 2.4
  
   I've being adviced not to change runzope.bat file since it might disrupt
   functionalities of zope 2.8.8 designed for python 2.3.5. what should I do?

  Use Zope 2.9 or Zope 2.10 that will require Python 2.4.

  - -aj
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.6 (Darwin)

  iD8DBQFFkhrYCJIWIbr9KYwRAgtlAJ0a2fcP15hkbO6FX0yD9zrUSGGKyQCcCiPE
  b1BfidjHojTfIXVdsx1Ui9c=
  =khQQ
  -END PGP SIGNATURE-



  __
  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 )
___
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] setting a title to all objects in a folder?

2006-12-27 Thread siva k

Hello,

Absolute newbie to python here. I try to set the SAME title to ALL the files 
in a
zope folder using a python script.  The code below is not working... no idea 
why


def setfiletitle(folder,title):
   myfolder = getFolder(folder)
   for file in myfolder:
   setTitle(title)



could you please say where did i go wrong?

Thanks

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


___
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] setting a title to all objects in a folder?

2006-12-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 17:38:21 + siva k [EMAIL PROTECTED]
wrote:

 Hello,

 Absolute newbie to python here. I try to set the SAME title to ALL the
 files in a
 zope folder using a python script.  The code below is not working... no
 idea why



 def setfiletitle(folder,title):
 myfolder = getFolder(folder)
 for file in myfolder:
 setTitle(title)

Why should it work?

Do you think that code works just because you
write some methods without knowing about APIs and the frameworks
behind?

To get hold of an object by path: use restrictedTraverse()
To get hold of objects with a folder: folder.objectValues(9
To change a property of an object: someobject.manage_changeProperties()

http://plope.com/Books/2_7Edition


Untested:

def foo(self, folder_path, title):

  folder = self.restrictedTraverse(folder_path):
  for o in folder.objectValues():
 o.manage_changeProperties({'tite' : title})


- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFkrDQCJIWIbr9KYwRAoynAJ0SaYEBWvXUuu0CVO2vlLJcbi4tRgCfTh3G
kT1+YB2uZqtSXcQHt/Lq/KU=
=NQvG
-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 )


Re: [Zope] zope sql_delimiter windows

2006-12-27 Thread garry saddington
On Sun, 2006-12-24 at 21:00 +0100, Dieter Maurer wrote:
 garry saddington wrote at 2006-12-23 22:26 +:
 I have a Zope application that runs perfectly on Linux. However, my
 target audience is likely to use Windows so I am trying to port my app.
 to that platform.
 Whenever I use a multiple insert Zsql method that includes
 sql_delimiter, python.exe crashes.
 
 There is no issue with sql_delimiter on Windows.
 
You are correct, after some pointers from the list, I chased down the
problem to the psycopg2 adapter. After downgrading to the last stable
version in the 1 series the problem has gone away.
Thanks to all who offered help.
Regards
Garry

___
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 set MIME types in zope

2006-12-27 Thread Sudesh soni
Forgive my ignorance, I have a question.

If I set the 'security' setting  in internet options :

'Open files based on content not file extension'   to Disable  

and the try to access a page rendered by python script then I get the following 
javascript error on the page:

This content might not be displayed properly.The file was restricted because 
the content does'nt match its security information

But if I enable the settings in Internet Options--Security, ie  'Open files 
based on content not file extension'  then the above error does not occur  

There seems a conflict between the extension type set by Zope and the MIME in 
Internet Explorer as it is seeing it has a script.

How can I resolve the error , keeping the property  'Open files based on 
content not file extension'   to Disable  ?

Do I have to set the MIME types in every file or it could be set at a single 
location in some zope configuration file?

Any help would be appreciated.

Thanks
Sudesh



- Original Message - 
From: Dieter Maurer [EMAIL PROTECTED]
To: Garito [EMAIL PROTECTED]
Cc: Lista Zope Internacional zope@zope.org
Sent: Friday, October 20, 2006 12:10 PM
Subject: Re: [Zope] How to do...


 Garito wrote at 2006-10-20 14:20 +0200:
Dieter Maurer escribió:
 You remember I have warned you: __getattr__ is difficult and error prone!

Even me, I have spend hours to understand why I get occasional
__getattr__ infinite loops...
And I know, in principle, all the potential caveats...

   
Can you point me to some example/product to try to avoid this kind of 
errors?
 
 It is quite difficult to learn all kinds of problems from an example.
 
 I think I already have publicly described my __getattr__ problems.
 Thus, you can search the mailing list archive...
 
 An example product where __getattr__ is used is BTreeFolder2.
 
 
 -- 
 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] usering module problem on zope 2.8.8

2006-12-27 Thread Allen Huang
I basicly copy what I have from 2.8 to 2.9
its the same problem with the self generated python constructor and the self 
constructor that I made
both worked in 2.8 but won't for 2.9
 
my constructor look like this using 
 
dtml-with shpTypeClass.createInObjectManager(REQUEST['id'], REQUEST)
 dtml-call propertysheets.shpTypePoint_desc.manage_editProperties(REQUEST)
 dtml-if NoRedir
  dtml-return name=this
 dtml-else
  dtml-if DestinationURL
   dtml-call RESPONSE.redirect(DestinationURL+'/manage_workspace')
  dtml-else
   dtml-call RESPONSE.redirect(URL2+'/manage_workspace')
  /dtml-if
 /dtml-if
/dtml-with
 
the error is
 
Time2006/12/27 19:48:33.523 GMT+8
User Name (User Id)admin (admin)
Request 
URLhttp://localhost/test/manage_addProduct/shpProcessing/shpTypeClass_factory/shpTypeClass_add
Exception TypeTypeError
Exception Valuedefault __new__ takes no parameters

Traceback (innermost last): 
Module ZPublisher.Publish, line 121, in publish 
Module Zope2.App.startup, line 240, in commit 
Module transaction._manager, line 96, in commit 
Module transaction._transaction, line 380, in commit 
Module transaction._transaction, line 378, in commit 
Module transaction._transaction, line 433, in _commitResources 
Module ZODB.Connection, line 484, in commit 
Module ZODB.Connection, line 526, in _commit 
Module ZODB.Connection, line 553, in _store_objects 
Module ZODB.serialize, line 407, in serialize 
Module ZODB.serialize, line 416, in _dump 
Module copy_reg, line 70, in _reduce_ex 
TypeError: default __new__ takes no parameters 
 
what is the problem??



- Original Message 
From: Andreas Jung [EMAIL PROTECTED]
To: Allen Huang [EMAIL PROTECTED]; Zope zope@zope.org
Sent: Wednesday, December 27, 2006 7:35:42 PM
Subject: Re: [Zope] usering module problem on zope 2.8.8


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 03:26:28 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I couldn't make a Z Class like I
 use to do when I'm was using Zope 2.8.


Why not? Where is your error description?

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFklqOCJIWIbr9KYwRAhK1AKCaei70217Ma7gMn/1bdCUBNl5ciQCff99b
KAMazCP5qofY2mIhe/OIetc=
=2Vxi
-END PGP SIGNATURE-

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


[Zope] External Method cPickle Import Module Error

2006-12-27 Thread Sean W. Duffy

Hi,

I have upgraded from Zope 2.8.5 to 2.9.4.  This currently works in the 
2.8.5 instance but not in the 2.9.4.


I have a Module Progress in /usr/lib/python2.4/site-packages/Progress 
containing 4 files:


__init__.py __init__.pyc  Progress.py  Progress.pyc

Both instances have calls to neuro.py which includes:

from Progress import Progress

The External Method in both instances looks good.  I even updated the 
External Method by clicking the Save Changes button without

error in the new 294 instance.

But when I access it from the dtml-method it goes boom:

Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit
Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction
Module App.Extensions, line 148, in getObject
 - __traceback_info__: ('/var/lib/hip_294_251/Extensions/neuro.py', 
'neuro')

Module /var/lib/hip_294_251/Extensions/neuro.py, line 299, in ?
Module /var/lib/hip_294_251/Extensions/neuro.py, line 9, in GetProgress
ImportError: No module named Progress

But Progress is in:  /usr/lib/python2.4/site-packages/Progress !

If I just start python at the command line I can import Progress w/o 
error.  I'm guessing that it has something to do with how

cPickle is sandboxed by Zope, but I just don't get it.

Any guidance sincerely appreciated,

Sean

Debug information:

# Zope version: (Zope 2.9.4-final, python 2.4.3, linux2)
# Python version: 2.4.3 (#1, Jun 13 2006, 16:41:18) [GCC 4.0.2 20051125 
(Red Hat 4.0.2-8)]

# System Platform: linux2
# SOFTWARE_HOME: /var/lib/zope294/lib/python
# INSTANCE_HOME: /var/lib/hip_294_251
# CLIENT_HOME: /var/lib/hip_294_251/var
# Process ID: 2507 (-1256522832)
# Running for: 19 min 17 sec
# sys.path:
/var/lib/hip_294_251/lib/python
/var/lib/hip_294_251/lib/python
/var/lib/zope294/lib/python/Zope2/Startup
/var/lib/hip_294_251/Products/ATContentTypes/thirdparty
/var/lib/zope294/lib/python
/usr/lib/python24.zip
/usr/lib/python2.4
/usr/lib/python2.4/plat-linux2
/usr/lib/python2.4/lib-tk
/usr/lib/python2.4/lib-dynload
/usr/lib/python2.4/site-packages
/usr/lib/python2.4/site-packages/Numeric
/usr/lib/python2.4/site-packages/PIL
/usr/lib/python2.4/site-packages/gtk-2.0


___
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 Method cPickle Import Module Error

2006-12-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 19:44:24 -0600 Sean W. Duffy [EMAIL PROTECTED] 
wrote:

 Hi,

 I have upgraded from Zope 2.8.5 to 2.9.4.  This currently works in the
 2.8.5 instance but not in the 2.9.4.

 I have a Module Progress in /usr/lib/python2.4/site-packages/Progress
 containing 4 files:

 __init__.py __init__.pyc  Progress.py  Progress.pyc

 Both instances have calls to neuro.py which includes:

 from Progress import Progress

 The External Method in both instances looks good.  I even updated the
 External Method by clicking the Save Changes button without
 error in the new 294 instance.

 But when I access it from the dtml-method it goes boom:

 Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module Products.ExternalMethod.ExternalMethod, line 134, in manage_edit
  Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction
  Module App.Extensions, line 148, in getObject
   - __traceback_info__: ('/var/lib/hip_294_251/Extensions/neuro.py',
 'neuro')
  Module /var/lib/hip_294_251/Extensions/neuro.py, line 299, in ?
  Module /var/lib/hip_294_251/Extensions/neuro.py, line 9, in GetProgress
 ImportError: No module named Progress

 But Progress is in:  /usr/lib/python2.4/site-packages/Progress !

 If I just start python at the command line I can import Progress w/o
 error.  I'm guessing that it has something to do with how
 cPickle is sandboxed by Zope, but I just don't get it.



I don't see any indication for a cPickle issue. *Trible* check that your 
Zope instance use the system Python installationl. Check your file 
permissions, check sys.path, check your $PYTHONPATH.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFk3KQCJIWIbr9KYwRAlcKAKDL0t0qSQFkau++QkcCFXzxVHNbxgCggpG3
ySS1E+jhamd0mLwC+fnvhlM=
=ZveC
-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 )


Re: [Zope] usering module problem on zope 2.8.8

2006-12-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 16:12:23 -0800 Allen Huang [EMAIL PROTECTED] wrote:

 I basicly copy what I have from 2.8 to 2.9
 its the same problem with the self generated python constructor and the
 self constructor that I made both worked in 2.8 but won't for 2.9

 my constructor look like this using

 dtml-with shpTypeClass.createInObjectManager(REQUEST['id'], REQUEST)
  dtml-call
 propertysheets.shpTypePoint_desc.manage_editProperties(REQUEST)
  dtml-if NoRedir
   dtml-return name=this
  dtml-else
   dtml-if DestinationURL
dtml-call RESPONSE.redirect(DestinationURL+'/manage_workspace')
   dtml-else
dtml-call RESPONSE.redirect(URL2+'/manage_workspace')
   /dtml-if
  /dtml-if
 /dtml-with

 the error is

 Time2006/12/27 19:48:33.523 GMT+8
 User Name (User Id)admin (admin)
 Request
 URLhttp://localhost/test/manage_addProduct/shpProcessing/shpTypeClass_fac
 tory/shpTypeClass_add Exception TypeTypeError
 Exception Valuedefault __new__ takes no parameters

 Traceback (innermost last):
 Module ZPublisher.Publish, line 121, in publish
 Module Zope2.App.startup, line 240, in commit
 Module transaction._manager, line 96, in commit
 Module transaction._transaction, line 380, in commit
 Module transaction._transaction, line 378, in commit
 Module transaction._transaction, line 433, in _commitResources
 Module ZODB.Connection, line 484, in commit
 Module ZODB.Connection, line 526, in _commit
 Module ZODB.Connection, line 553, in _store_objects
 Module ZODB.serialize, line 407, in serialize
 Module ZODB.serialize, line 416, in _dump
 Module copy_reg, line 70, in _reduce_ex
 TypeError: default __new__ takes no parameters

 what is the problem??

http://www.zope.org/Collectors/Zope/2005

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFk3NZCJIWIbr9KYwRAgXnAKDc609jQzO/7J1DFWVsAUAwruTSJgCgmJuO
c00q/FmZLZlfb1wkpobNtuI=
=75fR
-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 )


Re: [Zope] How to set MIME types in zope

2006-12-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 16:11:15 -0500 Sudesh soni 
[EMAIL PROTECTED] wrote:

 Forgive my ignorance, I have a question.

 If I set the 'security' setting  in internet options :

 'Open files based on content not file extension'   to Disable

 and the try to access a page rendered by python script then I get the
 following javascript error on the page:

 This content might not be displayed properly.The file was restricted
 because the content does'nt match its security information

 But if I enable the settings in Internet Options--Security, ie  'Open
 files based on content not file extension'  then the above error does not
 occur

 There seems a conflict between the extension type set by Zope and the
 MIME in Internet Explorer as it is seeing it has a script.

 How can I resolve the error , keeping the property  'Open files based on
 content not file extension'   to Disable  ?

 Do I have to set the MIME types in every file or it could be set at a
 single location in some zope configuration file?


IE's behavior is stupid and broken in many way. Not only different IE 
versions behave differently but also it depends on the Windows version.
One of the stupid errors I've encountered lately: you write a script to
generate a CSV file, you set the proper mime-type however IE does not 
recognize the response a CSV as long the URL *including* the query
string does not end with '.csv'.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFk3a3CJIWIbr9KYwRAqmzAJsH0ZmqRyoI+oRguOFiiwa9ET9QrgCeMebc
J/HPU6I/N6CgmLKPNnKdOvc=
=Ks6D
-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-DB] Sybase Adapter error :: alternatives?

2006-12-27 Thread Pablo Avalos
Hi guys

Sadly I'm stuck here at work with some Sybase DB, and I need to get some
info to the intranet plone-site..

I've found the SybDAv2 but it's dead old and doesn't work..

a) Has anyone made it work (recently)
b) any alternatives to get connect to a Sybase DB?

I really need help here =/

Thanks

?

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Sybase Adapter error :: alternatives?

2006-12-27 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 27. Dezember 2006 11:28:25 -0300 Pablo Avalos [EMAIL PROTECTED] 
wrote:

 Hi guys

 Sadly I'm stuck here at work with some Sybase DB, and I need to get some
 info to the intranet plone-site..

 I've found the SybDAv2 but it's dead old and doesn't work..

 a) Has anyone made it work (recently)
 b) any alternatives to get connect to a Sybase DB?

 I really need help here =/



How about mxODBC?

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFFkokECJIWIbr9KYwRAnVbAJ96Z7pSPfA1HMEExWxtmt/7YFtxgACeJmy7
mKA/oHWYNM2DHRxfXn7l6Qs=
=fOED
-END PGP SIGNATURE-

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Sybase Adapter error :: alternatives?

2006-12-27 Thread Jaroslav Lukesh
Use MS*SQL database adapter from object-craft, which use syb*ase as DB 
connector.


googling tip - remove * from string below
mss*ql syb*ase zope luk*esh

It working fine for Zope 2.5.1, for Zope 2.9.4 and plain python (2.1.3 ... 
2.4) too.


Regards, JL.

- Original Message - 
From: Pablo Avalos [EMAIL PROTECTED]

Sadly I'm stuck here at work with some Sybase DB, and I need to get some
info to the intranet plone-site..

I've found the SybDAv2 but it's dead old and doesn't work..

a) Has anyone made it work (recently)
b) any alternatives to get connect to a Sybase DB?


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Re: Sybase Adapter error :: alternatives?

2006-12-27 Thread Jaroslav Lukesh

object-craft have mssql adapter too. And for that adapter exist Zope DA...

- Original Message - 
From: Pablo Avalos [EMAIL PROTECTED]




actually I have the object-craft's sybase-python-module (...working)

but how do you do to use it as a Zope DB Adapter?? O.o?

?
Jaroslav Lukesh escribió:

Use MS*SQL database adapter from object-craft, which use syb*ase as DB
connector.


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Re: Sybase Adapter error :: alternatives?

2006-12-27 Thread Pablo Avalos
Hmm the only Adapter for MS*SQL I see here
(http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx)
is for windows only... I should have specified the zope server is
running Gentoo Linux =/

?


Jaroslav Lukesh escribió:
 object-craft have mssql adapter too. And for that adapter exist Zope DA...
 
 - Original Message - From: Pablo Avalos [EMAIL PROTECTED]
 
 
 actually I have the object-craft's sybase-python-module (...working)

 but how do you do to use it as a Zope DB Adapter?? O.o?

 ?
 Jaroslav Lukesh escribió:
 Use MS*SQL database adapter from object-craft, which use syb*ase as DB
 connector.

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Re: Sybase Adapter error :: alternatives?

2006-12-27 Thread Jaroslav Lukesh

Did you use google for string that I was specified?

- Original Message - 
From: Pablo Avalos [EMAIL PROTECTED]




Hmm the only Adapter for MS*SQL I see here
(http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx)
is for windows only... I should have specified the zope server is
running Gentoo Linux =/


___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] Sybase Adapter error :: alternatives?

2006-12-27 Thread Maciej Wisniowski
 b) any alternatives to get connect to a Sybase DB?
 How about mxODBC?
There is also SQLRelay that should work with Sybase

-- 
Maciej Wisniowski
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db