Re: [Zope] 2.3 and Products

2001-01-25 Thread Andy Dawkins

Brain

Cheers, That explains why it wouldn't do it then
:)

-Andy

Brian Lloyd wrote:
> 
> > I heard a rumour that with Zope 2.3 you don't need to restart the Zope
> > server after making changes a (python) Product.
> >
> > Can anyone confirm this?
> > If so how can I turn on/make this work ?
> >
> > -Andy
> 
> That's not the case - it was something that we considered,
> but doing this with a consistent and worthwhile level of
> service is extraordinarily hard. We don't want to put
> something new in that only works part of the time with a
> long list of caveats - in the long run, that would only
> cause confusion for people.
> 
> Brian Lloyd[EMAIL PROTECTED]
> Software Engineer  540.371.6909
> Digital Creations  www.digicool.com

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




[Zope] 2.3 and Products

2001-01-25 Thread Andy Dawkins

I heard a rumour that with Zope 2.3 you don't need to restart the Zope
server after making changes a (python) Product.

Can anyone confirm this?
If so how can I turn on/make this work ?

-Andy

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




RE: [Zope] PythonScripts editable through FTP?

2001-01-24 Thread Andy Dawkins

Chris

Yes you can use FTP to edit them.
(Tested with HomeSite)

Its kinda neat. The output looks like:
## Python Script "scripty1"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
a = 1
a = a + 1
return a

*GRIN*
-Andy

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris
> Withers
> Sent: 24 January 2001 14:54
> To: Jerome Alet
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Zope] PythonScripts editable through FTP?
>
>
> Jerome Alet wrote:
> >
> > Hi,
> >
> > Maybe I've not seen the easy way to do it, if so tell me I'm stupid, but
> > one thing would be very nice in the future version of Zope:
> >
> > A way to download Python Script's sources
> >
> > Now I cut and paste but it's horrible.
>
> Can't you use FTP to edit them?
>
> cheers,
>
> Chris
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>


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




RE: [Zope] DTML-LET problems

2000-12-08 Thread Andy Dawkins

Mohan
try this,





-AndyD

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mohan
> Baro
> Sent: 08 December 2000 14:41
> To: [EMAIL PROTECTED]
> Subject: [Zope] DTML-LET problems
> 
> 
> Why doesn't the following code work?
> How do I achieve the desired functionality?
> 
> 
> ">
> 
> 
> 
> Mohan.
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 

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




RE: [Zope] How to use newline_to_br?

2000-12-04 Thread Andy Dawkins

Almost got it



:)

-Andy

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Roland C. Reumerman
> Sent: 04 December 2000 12:30
> To: [EMAIL PROTECTED]
> Subject: [Zope] How to use newline_to_br?
>
>
> Scenario:
> - a tried to show a multi-line text field in HTML with the current return
> line feeds converted to 
> - I made a request form with a text field called data
> - in the response method there is a 
> On viewing the former, and then submitting it to the latter:
> Error Type: TypeError
> Error Value: not all arguments converted
> ??
> I tried some alternatives, but nothing worked.
>
> __
> ___
> Get more from the Web.  FREE MSN Explorer download :
> http://explorer.msn.com
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>


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




RE: [Zope] come see new.zope.org

2000-11-27 Thread Andy Dawkins

Ethan

errr. I have a problem with that address.

The following error was encountered: 

  Unable to determine IP address from host name for new.zope.org 

The dnsserver returned: 

  Name Error: The domain name does not exist. 

Cheers
-Andy

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of ethan
> mindlace fremen
> Sent: 27 November 2000 19:51
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [Zope] come see new.zope.org
> 
> 
> Zopatistas!
> 
> The cluster is up and running.  Please go pound it to see if it breaks:
> 
> http://new.zope.org
> 
> That lovely color is to remind you that you are *not* at the live site.  
> Any changes you make here *will* be lost.
> 
> If you have any questions or comments, please email [EMAIL PROTECTED]
> 
> A full report on how we did it will be appearing soon after the site 
> goes live.
> 
> ethan mindlace fremen  
> Zopatista Community Liason
> 
> 
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 

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




RE: [Zope] Objection to Python Script Name

2000-11-23 Thread Andy Dawkins


>
> But there is a difference for the internal methods (restrictions on
> security and builtins), as well as similarities with other Zope methods
> (the way you call it from DTML or via URL).  I was thinking of the analogy
> with ZSQL.
>
> BTW, can you use DTML tags in Python Script the same way you use them in
> ZSQL methods?
>
NO!

Did you honestly need to ask that, or where you cracking a joke?

-Andy


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




RE: [Zope] sort

2000-11-22 Thread Andy Dawkins

Mechtild

try


-Andy

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Mechtild Hofmann
> Sent: 22 November 2000 09:33
> To: [EMAIL PROTECTED]
> Subject: [Zope] sort
>
>
> Hello again,
>
> I want to sort catalog results e.g. by title alphabetical. But when I type
> sort_on='title' I see the titles in order by bobobase-modification-time.
> What I am doing wrong ?
>
> Thanks for help
>
> Mechtild--
>
> in der Heimat tut sich was: http://www.wolterdingen.de
> konteXXt - Web-Konzept-Text-Design
> 07705 / 919391
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>


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




RE: [Zope] ZMailIn - alternatives?

2000-11-21 Thread Andy Dawkins

Chris

If that will solve peoples problems.

But I haven't had much feedback on the product so its hard to make any
improvements.

-Andy

> -Original Message-
> From: Chris Withers [mailto:[EMAIL PROTECTED]]
> Sent: 21 November 2000 10:14
> To: Andy Dawkins
> Subject: Re: [Zope] ZMailIn - alternatives?
>
>
> Andy Dawkins wrote:
> >
> > Vince
> >
> > > I installed it right away - and I think it should work. When
> > > first trying to mail to the system it said it had some problem
> > > with the x-envelope-to header.
> >
> > The ZMailIn system doesn't use the x-envelope-to header it uses the
> > envelope-to header.
> > If your mail server provides x-envelope-to instead of
> envelope-to then you
> > need to change lines 83 and 84 in zopeMailIn.py to reflect this change.
>
>
> Yurch!
>
> How about factoring this out into a Property of the ZMailIn object?
>
> cheers,
>
> Chris
>


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




RE: [Zope] ZMailIn - alternatives?

2000-11-21 Thread Andy Dawkins

Vince

> I installed it right away - and I think it should work. When
> first trying to mail to the system it said it had some problem
> with the x-envelope-to header.

The ZMailIn system doesn't use the x-envelope-to header it uses the
envelope-to header.
If your mail server provides x-envelope-to instead of envelope-to then you
need to change lines 83 and 84 in zopeMailIn.py to reflect this change.

> As far as I understood the problem, the mail server should
> provide this feature, but mine doesn't. ;-(

What mail server are you using.  I know exim works fine and I have heard
reports of people using send-mail

> Thus I can't mail into the system. Any idea for workarounds?

If you still can't get it working then email me the exact details.  Prehaps
then I'll find an excuse to update ZMailIn and release another version :)

-Andy


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




RE: [Zope] ZMailIn - alternatives?

2000-11-20 Thread Andy Dawkins

Vince

What specifically is the problem.

As author of the ZMailIn Products prehaps I can help you solve your problem.

-Andy


>Hi Zope,
>
>I tried to install ZMailIn but due to several
>x-envelope-to-header problems from different providers I think
>it'll not become a viable way of getting articles into the
>system.
>
>Is there any alternative to ZMailIn?
>
>Cheers,
>
>Vince
>
> '''
> ô¿ô
>  -


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




RE: [Zope] ZCatalog Queries...

2000-08-31 Thread Andy Dawkins

>
>  > > > It's be nice if ZCatalog had a good general purpose
> > > > interface, and was a
> > > > bit more robust.
> > > > (the BTree implementation which has been mentioned a few
> > times springs
> > > > to mind here ;-)
> > >
> > > Can you be more specific?
> >
> > Andy can fill you in on the specifics.
>
> OK...

Specifics, hmmm OK

Machine 1: (2gb free hard drive space, 64Mb Memory, 128Mb swap, AMD Athlon
600, Linux Red Hat 6.1)

I created a new Zope Instance and installed ZMailIn porduct on to it.
(Catalog Aware)
I created a ZCatalog.
I sent 30,000 mail messages from [EMAIL PROTECTED] to the ZMailIn product.
These messages were catalog aware so they indexed themselves, one-by-one in
to the catalog.  Indexing the entire message body.

I went home.  When I came back the next day the machine had successfully
completed 5,000 messages, eaten all the memory, eaten 99% of the swap and
was chugging away a 1 mail message per 5 seconds.
Additionally the Data.fs was 1.5Gb

I decided this was going to take forever and ended it all.
(FYI: After packing the database it strank to 30Mb)

I started again from nothing.
This time i didn't create a ZCatalog.
I ran the import routines and 30,000 documents were successfully imported in
to the ZODB through ZMailIn in about 2 hours.
I created a catalog and manually added all items of type "ZMailMessage".
After about an hour of serious crunching.  All memory eaten, all swap eaten.
It reports that we are out of hard drive space.
I tried again after with various sub transactions sizes (ie. 1, 5000,
1000, 200) but no change, except on the amount of time before it blows up.

After a couple of messages to [EMAIL PROTECTED] and [EMAIL PROTECTED] we decide
that it may be worth another try without transactions, i.e. Replacing the
ZODB3 with The Berkeley Database.

Machine 2: (4.5gb free hard drive space, 256Mb Memory, 256Mb swap, Dual
PentiumIII 450, Linux Red Hat 6.2)

I created a new Zope Instance and installed ZMailIn porduct on to it.
(Catalog Aware)
I plugged in the BerkeleyDB
I imported all 30,000 mail messages.
I selected all ZMailMessage instance for cataloging and let it go.
About half a hour later the thing crashes with the error "file too large"
and corupts my Berkeley Database.
I try several sub transaction sizes (1, 5000, 1000, 200) to no avail.

The only time I ever got it to work is if I removed the body of the mail
message from the catalogs indexes.  Which is the most important thing to be
indexed.

After tearing my hair out, i have put it aside and am working on something
else.

(I hope that is what Chris meant by Specifics)

>
> >
> > >  What's insufficient about the current
> > > implementation?
> >
> > It doesn't scale well, especially for things where you have
> > lots of new
> > data arriving (this is the BTree problem, I think...)
>
> Yes, we're still working on a "broadtree" implementation that may allay
> some of these problems, although I don't have an ETA.
>
> >
> > It has no published and well defined query syntax (there's
> > patches here,
> > bits there, but no definitive document on how to use it, how to batch
> > with it, how to perform complex and structured queries, particularly
> > with TextIndex'es)
>
> Hopefully, the Zope book will make it more clear from a user
> perspective, and sometime in the very distant future I will be writing a
> chapter in the developer's guide about the catalog.  I agree that the
> ZCatalog wrapper should probably wrap more of the underlying catalog's
> methods, but these need to be rationalized, defined and then documented
> in the API docs.  This is something for dev.zope.org, probably.
>
> >
> > Don't get me wrong, it is very cool, but only kindof 70% there :S
> > (and I get the impression that doing the remaining 30% properly would
> > require a rewrite...)
> >
> > As an example, we've been trying to do Zope-based versions of the
> > mailing list archives for a coupla months now and the Catalog keeps
> > exploding in different ways (huge resource consumption, even for only
> > 30K messages or so, no matter what storage is used)
>
> Yes.  Tweaking and the broadtree stuff should make this a little better.
>
> >
> > Then there's the ubiquitous 'KeyError's and other associated
> > weirdness,
> > all of which leaves me feeling a lot less than totally
> > confident in the
> > Catalog ;-)
>
> These are independent of the coupling problem in the btree, and I'm
> trying to vanquish them now.  This is why the annoying logging code was
> added to the catalog.  It seems to be related to the TextIndex
> implementation, but I'm still trying to pin it down.
>


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




[Zope] [ANN]: ZMailIn 0.3.0 Now Available

2000-08-07 Thread Andy Dawkins

ZMailIn 0.3.0 is now available here:
http://www.zope.org/Members/NIP/ZMailIn/

Major Revisions:
  -- Global ZCatalog to index ZMailIn instances.
  -- Support for Multi-Mime type emails.
  -- Customisable Message handling via DTML-Methods.
  -- CatalogAware + Folderish.


Cheers
-Andy

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




RE: [Zope] Moving Objects that are Cataloged...

2000-08-04 Thread Andy Dawkins

Whilst in agreement with Chris I would like to throw another situation in
here that CatalogAware doesn't cater for.

If you change a folder name, somewhere higher in the tree, then all the
cataloged objects references are incorrect.

I think this is the same problem that Chris mentioned but a different
implementation.

-Andy

> then as far as i know there is no way around the problem?  anyone else
> have comment?
>
> i think that is the whole point of making objects catalogAware.
>
> Chris Withers wrote:
>
> > Terry Kerr wrote:
> > >
> > > how are you moving them?
> > >
> > > catalogAware objects unindex themselves when deleted then reindex
> > > themselves if pasted somewhere.
> >
> > The objects aren't catalogAware..
> >
> > Chris
>


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




RE: [Zope] Packing with cron

2000-08-04 Thread Andy Dawkins

> Have you ever used this from cron? Just so I know before I try it.
>
No I haven't tried it from cron yet but I see any reasons why you couldn't,
except to make sure all the libs are in a common/accessable place. eg.
Python/lib

-Andy


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




RE: [Zope] Packing with cron

2000-08-03 Thread Andy Dawkins

Jason

I'm not sure if it is worthy of putting up on Zope.
Although I'm sure people will correct me if I am wrong.

But I have no problems in letting you have it

 is the main python script.
You will need to change the line that reads
s=xmlrpclib.Server('http://myserver:8080/', transport=None,
username='username', password='password')
To reflect your correct server details.

 xmlrpc Library for python.
Place this in your python/libs directory, or the same directory as
packDb.py

 This contains the code for the external Method.
Place this in your zope/Extensions directory.  Create it if it doesn't
exist.

You will need to add an external method to the root of your ZODB that points
to packExtensions.py script

If you have any problem then please let me know.

-Andy



#!/usr/bin/python
# This module will pack zopes database
# Assuming you have placed the pack external method in the root
import sys, xmlrpclib

class packDb:
def __init__(self):
s=xmlrpclib.Server('http://myserver:8080/', transport=None, 
username='username', password='password')
# This is the external method.  If you haven't placed it in the root 
then adjust as required.
s.pack()

if __name__ == '__main__':
x = packDb()


def pack(self, REQUEST=None):
self.Control_Panel.Database.manage_pack()

return 'Done'

#
# XML-RPC CLIENT LIBRARY
#
# With Amos Latteier's Basic Authentication code added
#
# $Id$
#
# an XML-RPC client interface for Python.
#
# the marshalling and response parser code can also be used to
# implement XML-RPC servers.
#
# Notes:
# this version uses the sgmlop XML parser, if installed.  this is
# typically 10-15x faster than using Python's standard XML parser.
#
# you can get the sgmlop distribution from:
#
#http://www.pythonware.com/madscientist
#
# also note that this version is designed to work with Python 1.5.1
# or newer.  it doesn't use any 1.5.2-specific features.
#
# History:
# 1999-01-14 fl  Created
# 1999-01-15 fl  Changed dateTime to use localtime
# 1999-01-16 fl  Added Binary/base64 element, default to RPC2 service
# 1999-01-19 fl  Fixed array data element (from Skip Montanaro)
# 1999-01-21 fl  Fixed dateTime constructor, etc.
# 1999-02-02 fl  Added fault handling, handle empty sequences, etc.
# 1999-02-10 fl  Fixed problem with empty responses (from Skip Montanaro)
# 1999-06-20 fl  Speed improvements, pluggable XML parsers and HTTP transports
#
# Copyright (c) 1999 by Secret Labs AB.
# Copyright (c) 1999 by Fredrik Lundh.
#
# [EMAIL PROTECTED]
# http://www.pythonware.com
#
# 
# The XML-RPC client interface is
# 
# Copyright (c) 1999 by Secret Labs AB
# Copyright (c) 1999 by Fredrik Lundh
# 
# By obtaining, using, and/or copying this software and/or its
# associated documentation, you agree that you have read, understood,
# and will comply with the following terms and conditions:
#
# Permission to use, copy, modify, and distribute this software and
# its associated documentation for any purpose and without fee is
# hereby granted, provided that the above copyright notice appears in
# all copies, and that both that copyright notice and this permission
# notice appear in supporting documentation, and that the name of
# Secret Labs AB or the author not be used in advertising or publicity
# pertaining to distribution of the software without specific, written
# prior permission.
#
# SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
# TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
# ABILITY AND FITNESS.  IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# 

import string, time
import urllib, xmllib, base64
from types import *
from cgi import escape

try:
import sgmlop
except ImportError:
sgmlop = None # accelerator not available

__version__ = "0.9.8"


# 
# Exceptions

class Error:
# base class for client errors
pass

class ProtocolError(Error):
# indicates an HTTP protocol error
def __init__(self, url, errcode, errmsg, headers):
self.url = url
self.errcode = errcode
self.errmsg = errmsg
self.headers = headers
def __repr__(self):
return (
"" %
(self.url, self.errcode, self.errmsg)
)

class ResponseError(Error):
# indicates a broken response package
pass

class Fault(Error):
# indicates a XML-RPC fault package
def __init__(self, faultCode, faultString, **extra):
  

RE: [Zope] Packing with cron

2000-08-03 Thread Andy Dawkins

I have a python script which uses XMLRPC to call an External Method that
packs the database.

Not ideal, but it does allow me to pack the database
a) From Zope
b) From the command line
c) Whilst the server is running
d) During very large imports which make ZCatalog Explode (I wish
CatalogAware supported Sub Transactions)

-Andy

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Spisak
> Sent: 03 August 2000 16:37
> To: [EMAIL PROTECTED]
> Subject: [Zope] Packing with cron
>
>
> Zopists,
>
> I am attemtping to use cron to pack my ZODB.  I am using lalo's cron
> how-to and lynx.  However when I visit
> http://myhost:8080/Control_Panel/Database/manage_pack nothing happens.
> Here is the command I am using in Zope 2.1.6:
>
> lynx -auth superuser:superuserpasswd -source
> http://myhost:8080/Control_Panel/Database/manage_pack
>
> Is there anything obviously skewed about this?  Has anyone else tried it
> with success?
>
> Thanks in advance,
>
> Jason Spisak
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>


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




RE: [Zope] how to make an Product executable

2000-07-18 Thread Andy Dawkins


> I have a question ..
> I create a product and i would like to to use my product when I select
> it from the objects combo box. But It always puts me into the security
> screen !!! and not my index_html. I have several methods in that product
..

To create a new object you must supply an addForm and a method to add the
product.
e.g.

manage_addMyProductForm = HTMLFile('MyProductAdd',globals())

def manage_addMyProduct(self, id, title='')
"""Adds the product"""
self.setObject(id, MyProduct(id,title))
if REQUEST is not None:
return self.manage_main(self, REQUEST)

The product tabs are defined in the manage_options section of the product.py
The order is important the first item in the list is called when you access
the object from the management screens.  The index_html is the default when
accessed without the management screens.

For example:
manage_options = ( # the management options available
{'label': 'Contents',   'action': 'manage_main'},
{'label': 'View',   'action': ''}, # defaults to index_html
{'label': 'Properties',   'action': 'manage_propertiesForm'},
{'label': 'Security',   'action': 'manage_access'},
)

Download the boring product from zope.org
It is a plain shell of an object that does nothing, but works.

Hope that helps
-AndyD


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




RE: [Zope] HEELLPP - Please !!!

2000-07-10 Thread Andy Dawkins

Try using an argument other than 'login'

Change it to something else because login could easily be a reserved
keyword.

To test this simply change it to xlogin or something similar.

Let me know if that helps.
-Andy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mario
Premke
Sent: 10 July 2000 13:58
To: [EMAIL PROTECTED]
Subject: [Zope] HEELLPP - Please !!!


Hi,
I have the following ZSQL-Method:

arguments : login
-

select user_passwd as real_password
from users
where users.user_login=


when I now press "change and test" and insert a valid login into
the Login-field I get:

Error, Missing Input: Missing input variable, login

The database works just fine as do other ZSQL-Methods ...

Thanks,
Mario

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



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




[Zope] [ANN] ZMailIn 0.2.0 Now Available

2000-07-07 Thread Andy Dawkins

ZMailIn 0.2.0 is now available here ->
http://www.zope.org/Members/NIP/ZMailIn/

Major Revisions:
  -- xmlrpc instead of http post
  -- Python Products instead of ZClass
  -- Now two items (ZMailIn, ZMailMessage) instead of one (ZMailIn)
  -- Compatible with mailing lists
  -- Creates folder structure for emails



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




RE: [Zope] XML-RPC

2000-06-14 Thread Andy Dawkins

Try

http://www.zope.org/SiteIndex/search?date%3Adate=1969%2F12%2F31++16%3A00%3A0
0+US%2FPacific&date_usage=range%3Amin&text_content=xmlrpc

-Andy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Budi
Wiyono
Sent: 14 June 2000 10:34
To: [EMAIL PROTECTED]
Subject: [Zope] XML-RPC


Hi,

Where can I found Zope based XML-RPC example application ?

Thanks,
Budi Wiyono

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



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




[Zope] xmlrpc problem

2000-06-09 Thread Andy Dawkins

Hi

I am having a small probelm with xmlrpc.  I am simply trying to create a new
object within Zope.  For now the object will be a DTMLDocument.

I have a DTML Method with the id of createDocument and it reads:


Done

I also have a xmlrpc python module that reads:

import xmlrpclib
s=xmlrpclib.Server("http://www.myserver.com/Zope/test/")
args={}
args=['contents']="This is the contents of the new file"
s.createDocument(args)

The traceback I get reads:

Traceback (innermost last):
File "" line 1, in ?
File "xmlrpclib.py", line 550, in __call__
return self.__send(self.__name, args)
File "xmlrpclib.py", line 643, in __request
request
File "xmlrpclib.py", line 595, in request
headers
xmlrpclib.ProtocolError: 

If i change createDocument to read:


Done

and change the python module to read:

import xmlrpclib
s=xmlrpclib.Server("http://www.myserver.com/Zope/test/")
s.createDocument()

Then it successfully creates the document.

So how do I successfully pass arguments in to the DTML method so that it can
populate the new document with the correct data?

Cheers
-Andy Dawkins
(New Information Paradigms Ltd)


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