Re: [Zope-dev] Open Letters and Zope 3

2001-12-04 Thread Andy Dawkins

YAY

*There was much rejoicing*

Thanks Shane, once again you have solved my problems.

-Andy

Shane Hathaway wrote:
 
 Andy Dawkins wrote:
 
 Zope 3X requires Python 2.2b2.
 
 
  Are you sure you mean Python2.2b2?
 
  I tried this but seem to get problems with the pyexpat module.
 
  Would a different version do, Or have you solved any problems with the
  pyexpat module in 2.2.b2?
 
 Make sure you have expat, including the headers, installed when
 compiling Python (independently of Python).  On Mandrake 8.1 I installed
   the RPMs libexpat1_95-1.95.2-1mdk, libexpat1_95-devel-1.95.2-1mdk, and
 expat-1.95.2-1mdk.
 
 Shane

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



[Zope-dev] Zope 2.3.1b3 problem

2001-03-26 Thread Andy Dawkins

People

I have found this small problem but I don't know where it is coming from
or why.

If you create a Python Script in a folder:
---
print container.id

return printed
---

If fails with this error:

Error Type: TypeError
Error Value: call of non-function (type list)

Traceback (innermost last):
  File /usr/zope/zope-2_3_1b3/lib/python/ZPublisher/Publish.py, line
223, in publish_module
  File /usr/zope/zope-2_3_1b3/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /usr/zope/zope-2_3_1b3/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File /usr/zope/zope-2_3_1b3/lib/python/ZPublisher/Publish.py, line
171, in publish
  File /usr/zope/zope-2_3_1b3/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: h)
  File /usr/zope/zope-2_3_1b3/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: h)
  File /usr/zope/zope-2_3_1b3/lib/python/Shared/DC/Scripts/Bindings.py,
line 324, in __call__
(Object: h)
  File /usr/zope/zope-2_3_1b3/lib/python/Shared/DC/Scripts/Bindings.py,
line 353, in _bindAndExec
(Object: h)
  File
/usr/zope/zope-2_3_1b3/lib/python/Products/PythonScripts/PythonScript.py,
line 336, in _exec
(Object: h)
(Info: ({'script': PythonScript instance at 83c9878, 'context':
Folder instance at 874b608, 'container': Folder instance at 874b608,
'traverse_subpath': []}, (), {}, None))
  File Script (Python), line 2, in h
(Object: lambda)
TypeError: (see above)


I have managed to reproduce this on Zope 2.3.1b2 and Zope 2.3.1b3 but it
works fine on Zope 2.3.1b1

Any Ideas/Assistance?

-Andy

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



Re: [Zope-dev] Zope 2.3.1b3 problem

2001-03-26 Thread Andy Dawkins

Phil Harris wrote:
 
 Andy,
 
 Try
 
 print container.getId()
 
 return printed
 
 hth
 
 Phil
 

That doesn't work either.

Prehaps I should have been more specific.

Generally _any_ calls on the container result in this error.

I used 'container.id' because this is the simplist one to reproduce.

In actual place where I am having this problem is where the container is
a foldish product writen by NIP.  But the fact that it is reproducable
with the standard Zope Folder shows that something is fubar.

I suspect the way container is implemented in PythonScript but I
(personnaly) don't want to jump in that peice of code unless absolutely
necersary.

Cheers Anyway tho'

-Andy

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



Re: [Zope-dev] Zope 2.3.1b3 problem

2001-03-26 Thread Andy Dawkins


 I'd file this in the Collector, I have seen another problem with Python
 Scripts that seems related on the lists somewhere, I think something
 changed out from under Ethan's feet..
 

This has been collected:

No. 2094

http://classic.zope.org:8080/Collector/2094/view

Cheers
-Andy

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



[Zope-dev] ZCatalog bug in 2.3.1b2

2001-03-20 Thread Andy Dawkins

I posted this before but didn't get a reply.

Has any one seen this bug, Or do they know a fix?

ATM this is stopping me using 2.3.1b2 which is a bad thing(tm)

---
Zope Errorr

Zope has encountered an error while publishing this resource.

Error Type: TypeError
Error Value: len() of unsized object

With this traceback:
Traceback (innermost last):
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Zope/__init__.py,
line 221, in zpublisher_exception_hook
(Object: Traversable)
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/mapply.py,
line
160, in mapply
(Object: executeSearch)
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: executeSearch)
  File 
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/OFS/DTMLMethod.py,
line 189, in __call__
(Object: executeSearch)
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_String.py,
line 538, in __call__
(Object: executeSearch)
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_Let.py,

line 146, in render
(Object: Results="Catalog(REQUEST=REQUEST)")
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_Util.py,
line 334, in eval
(Object: Catalog(REQUEST=REQUEST))
(Info: REQUEST)
  File string, line 0, in ?
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/ZCatalog.py,
line 530, in searchResults
(Object: Traversable)
  File

/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/Catalog.py,
line 654, in searchResults
  File
/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/Catalog.py,
line 591, in _indexedSearch
TypeError: (see above)


Here is the line which calls the search:

sr = self.searchResults({'Type' : type, 'sort_on':'lowercase_title_'})

fyi. type = 'TypeTest'

The indexes are as follows:
Status = Text Index
Type = Field Index
Identifier = Field Index
lowercase_title_ = Field Index
parent_identifiers_ = Keyword Index

The meta types are like this:
Title
id
identifier

There are only 13 records in the catalog.
And there are some results to be returned.

Cheers
-Andy

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



Re: [Zope-dev] New Zcatalog bug on b2?

2001-03-17 Thread Andy Dawkins

Chris

I also have this error with 2.3.1b2
Here is the line which calls the search:

sr = self.searchResults({'Type' : type, 'sort_on':'lowercase_title_'})

fyi. type = 'TypeTest'

The indexes are as follows:
Status = Text Index
Type = Field Index
Identifier = Field Index
lowercase_title_ = Field Index
parent_identifiers_ = Keyword Index

The meta types are like this:
Title
id
identifier

There are only 13 records in the catalog.

Cheers
-Andy

Chris McDonough wrote:
 
 Julio,
 
 Can you give us the actual index names that you're putting in the request to
 search against, the query values you're passing in to each index, and the
 contents of the sort_on parameter for that request?  What kinds of indexes
 are referred to by each of the index names in the query?
 
 - Original Message -
 From: "Jlio Dinis Silva" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, March 16, 2001 2:28 PM
 Subject: [Zope-dev] New Zcatalog bug on b2?
 
  When passing in the REQUEST the var sort_on into the
  searchREsults method I get this error:
 
  Zope Errorr
 
  Zope has encountered an error while publishing this resource.
 
  Error Type: TypeError
  Error Value: len() of unsized object
 
  With this traceback:
 
  Traceback (innermost last):
File
  /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
  line 223, in publish_module
File
  /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
  line 187, in publish
File /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Zope/__init__.py,
  line 221, in zpublisher_exception_hook
  (Object: Traversable)
File
  /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
  line 171, in publish
File
  /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/mapply.py,
 line
  160, in mapply
  (Object: executeSearch)
File
  /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
  line 112, in call_object
  (Object: executeSearch)
File
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/OFS/DTMLMethod.py,
  line 189, in __call__
  (Object: executeSearch)
File
 
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_String
 .py,
  line 538, in __call__
  (Object: executeSearch)
File
 
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_Let.py
 ,
  line 146, in render
  (Object: Results="Catalog(REQUEST=REQUEST)")
File
 
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_Util.p
 y,
  line 334, in eval
  (Object: Catalog(REQUEST=REQUEST))
  (Info: REQUEST)
File string, line 0, in ?
File
 
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/ZCatalog
 .py,
  line 530, in searchResults
  (Object: Traversable)
File
 
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/Catalog.
 py,
  line 654, in searchResults
File
 
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/Catalog.
 py,
  line 591, in _indexedSearch
  TypeError: (see above)
 
 
 
 
 
 
 
 
 
  _
  Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
 
 
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

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



Re: [Zope-dev] Weird Re-Indexing Errors after move to Zope 2.3.1b1

2001-03-02 Thread Andy Dawkins

Chris Withers wrote:
 Is there a workaround in the meantime? This is turning into a real
 showstopper for one of NIP's most important projects right now :~(
 
 desperately,
 

Chris

I the meantime I have changed that method to the following:

def insertReverseIndexEntry(self, entry, documentId):
"""Insert the correct entry into the reverse indexes for future
unindexing."""

newRow = self._unindex.get(documentId, [])
if newRow:
# Catch cases where we don't need to modify anything
if entry in newRow:
return 1

if type(newRow) == type([]):
newRow.append(entry)
elif type(newRow) == type(())):
newRow = newRow + (entry,)

self._unindex[documentId] = newRow

I know it isn't exactly the best fix in the world, but I stops the error
_today_ which is what we need.

So Until the next version it will do.

Cheers

-AndyD

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



[Zope-dev] Unindex_Object, bug (Again)

2001-02-20 Thread Andy Dawkins

The bug with zope 2.3.0 that I reported with this mail:

http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/5FE0F6EF4EFF2299

Has made it in to 2.3.1b1

Can we please get rid of it this time??

Do I need to submit anything to the collector for this to happen?

-Andy

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



Re: [Zope-dev] Unindex_Object, bug (Again)

2001-02-20 Thread Andy Dawkins

Chris McDonough wrote:
 
 Andy,
 
 Eek!!  Please do submit this to the collector again.
 
 Apologies,
 
  - C
 
I have submitted it to the collector with a patch, so there will be no
excuses next time :)

-Andy

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



[Zope-dev] Re: [Zope] New Python Script Logo?

2001-02-20 Thread Andy Dawkins

[EMAIL PROTECTED] wrote:
 
 Hi,
 
 Here's take II of the funky logo for python scripts (adapted from the Win32
 Python distribution)
 This one is transaparent where it needs to be...
 
 enjoy :-)
 
 Chris

Totally Groovy

Its made its way in to my Zope installation's

-Andy

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



Re: [Zope-dev] Profiling Products

2001-02-08 Thread Andy Dawkins

Martijn Pieters wrote:
 Have a look at: Control Panel - Debug Information. There is a 'Profiling'
 tab that explains what you have to do to switch it on.
 
 --
 Martijn Pieters

Oh my god, That is so sexy

:-)

Cheers Martijn, I owe you a pint.

-Andy

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



[Zope-dev] Profiling Products

2001-02-07 Thread Andy Dawkins

People

I have a desire to be able to profile my Python Product so that I can
benefit from the advantages of profiling.

Has anybody done this?
Does anybody know how to do this?

I have tried profiling Z2.py but of course that doesn't drop down to the
level of the python product (Possibly running in a different thread - or
something :( )

General Comments Welcomed.
Cheers
-Andy

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



[Zope-dev] 2.3.0. Unindex_object Tried To Unindex Nonexistent

2001-01-29 Thread Andy Dawkins

I'm having some more problems with the ZCatalog in Zope 2.3.0

I've got a name error in the file UnTextIndex.py

Error Type: NameError
Error Value: i

I believe this is occuring when the catalog tries to unindex an object
that isn't currently indexed.

The traceback reports line 332:

File /usr/zope/zope-2_3_0/lib/python/SearchIndex/UnTextIndex.py, line
332, in removeForwardEntry

The line in question reads:
LOG('UnTextIndex', ERROR,
'Unindex_objects tried to unindex nonexistent'
' document %s' % str(i))

The function never uses or declares i, however it does use documentId.
I think perhaps the i should have been documentId but I thought i would
check with you guys first.

What do you think?

-Andy

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




[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] 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 )




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-dev] New UI for 2.3

2001-01-12 Thread Andy Dawkins

Well just to be completely different to everyone else, I like the new look.

The bar at the top takes up a centimeter on my 20in monitor and it doesn't
bother me in the slightest.

I think Brain is right, People have been asking for DC to give Zope a face
lift and now its got one you are all complaining about it.

Don't get me wrong the points you raised are valid but you are complaining
about 32 pixels.  Give it a week and you won't know what you were
complaining about.

Overall it gets the thumbs up from me. :)

-Andy
(P.S. Why hasn't the acl_users folder got the same style of
shaded/non-shaded rows, Just a consistancy thang :)

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
 Of Brian Lloyd
 Sent: 12 January 2001 02:12
 To: Steve Alexander; [EMAIL PROTECTED]
 Subject: RE: [Zope-dev] New UI for 2.3


  I think the new UI for 2.3 is great improvement over 2.2.
 
  I'm already finding the sorted tables of folder contents useful, and
  having the add new items select at the top saves time.
 
 
  However, I do not like the 3-frame interface. I feel that the top frame
  is wasted space. The Zope logo and "Logged in as username | Logout"
  could as easily go at the bottom of the tree-view frame on the left.
  This would leave extra screen space for doing work.
 
  I realize that I can make the frame smaller by dragging it with my
  mouse. I do a lot of TTW development, and I think I might find that
  cumbersome, so I guess I'll be hacking the top frame out of my
  management interface :-)

 Are you guys working on 486's with 13in. monitors at 640x480 or
 something? :^)

 Seriously - Zope has been criticized for a very long time for
 being, ah, aesthetically challenged :) It is a valid criticism
 - we have been (and quite honestly, will continue to be) more
 concerned with function over form. But is it really so bad to
 make a 32 pixel-high concession to a small pittance of branding?

 I know that "branding" isn't important for those who are already
 believers, but Zope has grown enough that its reasonable to put
 some effort into "first impression factor". It doesn't help the
 community for reviews to come out that waste words on the
 visual appeal shortcomings of the UI and totally miss the
 point. A better first impression is a Good Thing.

 The top frame is also a place where we might want to put more
 "placeless" operations like logout in the future. You can only
 jam so much into the tree pane without it looking very much
 like way too much is being jammed into the tree pane :) FWIW,
 one of the things we may put there later is a way to do "browser
 preferences" via cookies to control things like default text
 area sizes. That could also have a "hide top frame" option for
 those who really can't spare the 32px. :^)



 Brian Lloyd[EMAIL PROTECTED]
 Software Engineer  540.371.6909
 Digital Creations  www.digicool.com


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



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




RE: [Zope-dev] case insensitive sorts

2001-01-04 Thread Andy Dawkins


  * collation (which letters belong together) is highly locale
sensitive (e.g., does a-accent-grave sort with a? etc.)


A Fair point.

The answer is whatever seems _naturally_ correct from a users point of view.
I think the answer is yes.

Elephant
entropy
écrit
élan

i.e. In the order in which they would appear in a dictionary.

  * Should strings which differ only in case be equal (*NOT*!)


'Ant' is not equal to 'ant' but 'Ant''ant''Ante''ante'

i.e.

Ant
ant
Ante
ante

Would be a sensible sort order.

I hope that makes things a bit clearer.

-Andy


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




RE: [Zope-dev] case insensitive sorts

2001-01-03 Thread Andy Dawkins

 Dieter Maurer wrote:
 
  Chris Withers writes:
Dieter Maurer wrote:
 Andy McKay writes:
    what does anyone else think

 I would not like it.
   
Why not? ;-)
  I would not like to see this sort order in the management
  screens, because I use capitalization to ensure that
  essential objects are at the top of the object list.

 Hmmm... that's like saying you'd rather not have a memory leak fixed
 because it gives you an excuse to buy more RAM ;-)

 *grinz*

 Chris


I would have said its like saying your not going to fix the hole in your
water pipe because you use it to fill up your kettle without getting out of
bed, and if you fixed it then you would have to walk to the sink.

:-)

Needless to say I agree with Chris.

-Andy


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




RE: [Zope-dev] case insensitive sorts

2001-01-03 Thread Andy Dawkins

  Andrew
  David
  Wayne
  bart
  sophie
 
  is better than sorting:
 
  Andrew
  bart
  David
  sophie
  Wayne
 
 That's only because you use NT (ach spit). ;)
 

Thats not actually true.

It is how python behaves on WinNt, Win9X, Linux, etc
(I have tested this)

-Andy

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




RE: [Zope-dev] case insensitive sorts

2001-01-03 Thread Andy Dawkins

 Your analogies imply that this behavior is a bug or an unintended flaw
 in the design. I would argue that it is intentional. Unix file systems
 work the same way. Try doing an "ls" with mixed case files and you'll
 see what I mean.
 

It isn't a flaw.  It seems as though it was overlooked.

The sort on text works by sorting the data by its ascii value.
Capital letters have a lower ascii value than lower case letters.
i.e.
A-Z = 65 - 90
a-z = 97 - 122


The arguement is that the sort should probably go
AaBbCcDdEeFf.etc

-Andy



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




RE: [Zope] DTML-LET problems

2000-12-08 Thread Andy Dawkins

Mohan
try this,

dtml-let the_current_user="REQUEST.AUTHENTICATED_USER.getUserName()"
dtml-var the_current_user
/dtml-let

-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?
 
 
 dtml-let the_current_user="dtml-var 
 "AUTHENTICATED_USER.getUserName()""
 dtml-var the_current_user
 /dtml-let
 
 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

dtml-var data newline_to_br

:)

-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 BR
 - I made a request form with a text field called data
 - in the response method there is a dtml-var data fmt="newline_to_br"
 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] 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-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-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-dev] Fw: 2gb file size

2000-11-07 Thread Andy Dawkins

Shane

This would be very helpfull to share.

One of the reasons I tried the Berkeley Database was because I kept blowing
this 2Gb limit.

Prehaps if this was released I could finally finish the zope mail archives.
:-)

Cheers

-Andy

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Shane Hathaway
 Sent: 06 November 2000 21:51
 To: Andy McKay; [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] Fw: 2gb file size


 Andy McKay wrote:
 
  I did do a How-to as well http://www.zope.org/Members/andym/2gig

 Not long ago I created a wrapper around File objects which automatically
 splits the file before it reached a predefined limit.  It could handle
 any number of partitioned file segements.  I tried it with FileStorage
 and even integrated it in.  That's how we were able to find and fix some
 arithmetic errors that occurred in FileStorage when reaching the 2GB
 barrier.  If there's interest in the community I can release the code
 (in fact, there is no dependency on Zope and it's pretty fast.)

 OTOH, I can verify there are production sites that have succesfully
 reached around 10 GB in Data.fs size.

 Shane

  --
Andy McKay, Developer.
ActiveState.
  - Original Message -
  From: "Andy McKay" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, November 06, 2000 9:26 AM
  Subject: Re: [Zope-dev] Fw: 2gb file size
 
   Thank you everyone for your help. I truncated the file and
 restarted Zope
   successfully. I had a brief period of problems when I forgot
 use binary
  mode
   for truncating the file - duh. Anyway, I am running 2.2.1 and
 it doesnt
  work
   with a 2gb file. I didnt analyse where the problem lies, however I do
   believe its a python issue.
  
   Thanks.
   --
 Andy McKay, Developer.
 ActiveState.
   - Original Message -
   From: "Itamar Shtull-Trauring" [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Sunday, November 05, 2000 2:37 AM
   Subject: Re: [Zope-dev] Fw: 2gb file size
  
  
Shane Hathaway wrote:
   
 Are you running Zope 2.2.1 or later?  There were pointer
 arithmetic
 errors that occurred on earlier versions, even with
 operating systems
 that support 2 GB files.
   
So on W2K, Zope can have 2GB databases? I'd really like to
 hear if you
   get
it to work Andy (or if anyone else did.)
   
--
Itamar S.T.  [EMAIL PROTECTED]
Fingerprint = D365 7BE8 B81E 2B18 6534  025E D0E7 92DB E441 411C
   
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )
   
  
  
  
   ___
   Zope-Dev maillist  -  [EMAIL PROTECTED]
   http://lists.zope.org/mailman/listinfo/zope-dev
   **  No cross posts or HTML encoding!  **
   (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )
  
 
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )

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



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




[Zope-dev] ZMYSALDA - Ports

2000-10-16 Thread Andy Dawkins

People

Has anyone managed to patch the MYSQLDA so that you can access a MySQL
server on a different port?

i.e. port 3307 instead of the default 3306

If so would you care to share the breakthrough with me please?

Andy Dawkins


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




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] 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] 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-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] 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

packDb.py 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.

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

packExtension.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 (
"ProtocolError for %s: %s %s" %
(self.url, self.errcode, self.errmsg)
)

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

class Fault(Error):
# indicates a XML-RPC fault 

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=dtml-sqlvar name=login type=string


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-dev] INSTANCE_HOME

2000-07-03 Thread Andy Dawkins

does anybody know where REQUEST['INSTANCE_HOME'] disappeared to between Zope
version 2.1.4 and version 2.1.6.

Furthermore is it likely to reappear or has it been succeeded by some other
key.

Cheers,
-Andy Dawkins


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




RE: [Zope-dev] Product Data Storage

2000-06-30 Thread Andy Dawkins

You should look into using ZCatalog for this purpose.

OK - that is a solution that could solve my particular issue, but where
would you put it?  Would you put it in the Product folder, or in some common
place in the ZODB.
How would you create it originally? In the products __init__.py or by some
kind of DTML method.

Also would the ZCatalog be appropriate for storing general information to be
shared between instances, Maybe some global configuration options.

I am looking for a generalised method of storing Class Level Variables.
Maybe properties within the Product folder.

But above all I am looking for a method of doing this that the Zope
community agrees as being efficient and recognises as being _the_ solution
to the problem.  I want to avoid a 'hack' solution if possible.

-Andy Dawkins
(New Information Paradigms Ltd)


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




RE: [Zope-dev] Product Data Storage

2000-06-30 Thread Andy Dawkins

Dan wrote:
Shared data should go in zope/var, or a subdirectory of that.
Zope/lib should be considered read-only by running products unless
explicitly changed by the user.  As you have correctly pointed out,
lots of machines share Zope installations for multiple servers.

A standard interface for Python code to get a private subdirectory of
var might well be useful.

Now we're talking, that sounds reasonable.  Thanks for pointing out the
zope/var vs Zope/lib, point taken.  I'm about to code this bit now so for
version 0.2 I'll put a text file in the zope/var directory.

The private subdirectory idea sounds great, but I think some people may
prefer a ZODB solution due to backup's, accessibility and, dare I say it,
ZEO.

Arrgghh, ZEO I didn't think about it until just then. Are there any ZEO
issue's I need to be aware of?

OK - These are great suggestions and I am taking them all in, honest.

Cheers
-Andy


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




[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:

dtml-call "manage_addDTMLDocument('new_document','New Doc',contents)"
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 "stdin" 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: Protocol Error for www.myserver.com/Zope/test/:
401 Unauthorized

If i change createDocument to read:

dtml-call "manage_addDTMLDocument('new_document','New Doc')"
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 )