Re: [Zope] force the output encoding to utf-8 in page templates

2011-11-11 Thread morten
On Fri, 11 Nov 2011 12:56:30 +0100, Yuri y...@alfa.it wrote:
 Il 11/11/2011 12:43, Yuri ha scritto:
 Hi all!

  I've a Zope2 application with Postgresql. All is ok and utf-8 but
 page templates. This means that non utf-8 data is sent to the
 database, and the database complain with:

 *Error Type: DataError*
 *Error Value: invalid byte sequence for encoding UTF8: 0xe82527
 HINT: This error can also happen if the byte sequence does not match
 the encoding expected by the server, which is controlled by
 client_encoding.

 *This does not happen if I manually switch the browser encoding
 (Firefox - View - character encoding - Unicode (UTF-8)) and submit
 a form.

 So my question is: how do I tell to page templates to output utf-8
 instead of iso8859-15? The output_encoding property does anything.

 Obviously, changing default-zpublisher-encoding to utf-8 works, but
 other legacy applications will have problems on characted encoding.

 Any idea?
 **
 
 
 I've solved in page templates code:
 
  if not response.headers.has_key('content-type'):
  response.setHeader('content-type', self.content_type + 
 ';charset='  + self.output_encoding) - here add the utf-8, the 
 publisher will find this filled and avoid to put the default.
 
 on line 315 of ZopePageTemplate.py
 
 Is there a better way? Thanks!

Look for setting the default publisher encoding in the zope.conf
filesystem file and restart.  :)

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


Re: [Zope] Building a fast, scalable yet small Zope application

2009-04-27 Thread Morten W. Petersen

 I suggest you experiment a bit. Create 100 million objects, and do
 some of the actions you are planning to do on them.
   

Right.  I'm thinking of taking the time to try a simple SQL based 
implementation,
as well as one in ZODB.  I need to learn more about high-speed Zope 
programming
as well as keeping my SQL skills up to date so.  :-)

-Morten

-- 
Morten W. Petersen
Manager
Nidelven IT Ltd

Phone: +47 45 44 00 69
Email: mor...@nidelven-it.no

___
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] Building a fast, scalable yet small Zope application

2009-04-27 Thread Morten W. Petersen
Lennart Regebro skrev:
 On Sat, Apr 25, 2009 at 13:24, Morten W. Petersen mor...@nidelven-it.no 
 wrote:
   
 So far, I've been contemplating disabling undo (if that's possible),
 

 I doubt that it would make a difference. The Undo functionality comes
 out of the database being logging, and changing that would mean pretty
 much a complete rewrite.
   

OK.  Well, I'm concerned about how much a database would grow.  I'm 
thinking if
I use one BTree for all the entries, would the database grow just a 
little or a lot when
you start getting into the millions of entries when inserting one small 
item?

 and using BTree structures, maybe segmenting objects into different groups
 (folders) to further speed up lookups.
 

 Yes, in my experience putting small objects in to BTree structures is
 quite fast. You may be talking about BTreeFolders, and in that case I
 don't know, I haven't done any sort of performance testing on those, I
 have used BTrees directly though, and that was fast. I haven't
 compared to SQL, but others have, and ZODB itself seems according to
 those tests quite fast. We know Plone slows everything down immensly
 in any case.

 I don't know if BTrees get slow when they get very big, so you would
 need to test that.
   

Mm.  Yes, Plone is a bit sluggish, that's why I want to write a purely 
Zope-based app.

Yeah, I'll have to try different storage strategies in the ZODB, to see 
if a BTreeFolder
containing BTrees in the [0-9|A-Z|a-z] ranges would do, or if I need to 
partition it
up further with BTreeFolders containing BTreeFolders.

On the one hand I'm concerned about lookup speed, on the other about 
speed of
inserts and how much the entire database will grow inserting a  1 KB 
object.

  Should I consider using the ZCatalog for faster lookups?
 

 Maybe. You probably need to not only store the objects in BTrees, but
 also somehow have indexes. These you do by storing the values you want
 to search on in BTrees as well. The ZCatalog does this in a
 configurable way for you, so if you need configurability, yes. If not,
 it's probably faster to make your own indexes with your own BTrees.
   

Mm.  I guess I could be OK with one index, it being the id/path of the 
object.  However,
it would be nice to build for the future and include the ability to 
search all objects.  Maybe
a combination of the two could work.

-Morten

-- 
Morten W. Petersen
Manager
Nidelven IT Ltd

Phone: +47 45 44 00 69
Email: mor...@nidelven-it.no

___
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] Building a fast, scalable yet small Zope application

2009-04-27 Thread Morten W. Petersen
Peter Bengtsson skrev:
 From experience I find that BTrees are very fast to write to and pick
 out items from. Even in the millions. (Never gone into the tens of
 millions or further)
 Also, when it comes to browsing stuff I find SQL faster and easier to
 work with. An added advantage of a RDBMS is that you get the indexing
 seamlessly built in (no need to bridge zbrain.getObject()) and it
 makes it easier to optimize and figure out which indexes help and
 which indexes slow you down which is something that is far from
 obvious with a ZCatalog approach.
   

Right.  But wouldn't profiling indexes in Zope be as easy as wrapping the
index search method in a function that does time.time before and after
the search?  :-)

-Morten

-- 
Morten W. Petersen
Manager
Nidelven IT Ltd

Phone: +47 45 44 00 69
Email: mor...@nidelven-it.no

___
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] Building a fast, scalable yet small Zope application

2009-04-27 Thread Morten W. Petersen
Hedley Roos skrev:
 I've followed this thread with interest since I have a Zope site with
 tens of millions of entries in BTrees. It scales well, but it requires
 many tricks to make it work.

 Roche Compaan wrote these great pieces on ZODB, Data.fs size and
 scalability at 
 http://www.upfrontsystems.co.za/Members/roche/where-im-calling-from/catalog-indexes
 and 
 http://www.upfrontsystems.co.za/Members/roche/where-im-calling-from/fat-doesnt-matter
   

Thanks for those links, interesting stuff.  :-)

 My own in-house product is similar to GoogleAnalytics. I have to use a
 cascading BTree structure (a btree of btrees of btrees) to handle the
 volume. This is because BTrees do slow down the more items they
 contain. This is not a ZODB limitation or flaw - it is just how they
 work.
   

Something like Google Analytics I'd be interested in too, it wasn't the 
aim for this
thread but something that's been bobbing around in my head.  Is this 
something
you're thinking of releasing or is it too good/bad to share?

-Morten

-- 
Morten W. Petersen
Manager
Nidelven IT Ltd

Phone: +47 45 44 00 69
Email: mor...@nidelven-it.no

___
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] Building a fast, scalable yet small Zope application

2009-04-25 Thread Morten W. Petersen
Hi,

I'm considering building a large scale, but small in features site.  It 
will contain
lots of small objects (millions, tens of millions, hundreds of millions) 
of objects,
where each object has a couple of strings and maybe some other light 
attributes.

So far, I've been contemplating disabling undo (if that's possible), and 
using
BTree structures, maybe segmenting objects into different groups 
(folders) to
further speed up lookups.  Scalability is also an issue, should I 
consider using
RelStorage?  Should I consider using the ZCatalog for faster lookups?

Has anyone else developed something similar?  Are there Zope product
examples out there that fit the bill?

-Morten

-- 
Morten W. Petersen
Manager
Nidelven IT Ltd

Phone: +47 45 44 00 69
Email: mor...@nidelven-it.no

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


Re: [Zope] Zope and SSL

2009-03-16 Thread Morten W. Petersen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Catherine,

well.. I don't have much experience running SSL on Zope itself, but
we use Apache in front and that works well.

You'll just have to figure out some RewriteRule directives for
Apache and configure it.  Most SSL providers (that I've seen anyway)
do have clear instructions on how to go about SSL when Apache is involved.

- -Morten

Catherine E. Reinehr wrote:
 Hello,
 
 I'm trying to find out how to generate a CSR, and I can't find the
 information I need.  All my research covers Zope and Apache or Zope and
 Linux, etc., but our server is running ONLY Zope.  Version 2.6.2, to be
 exact.  Unfortunately, I know next to nothing about setting up a secure
 server anyway.  Any help you can offer would be much appreciated!
 
 
 Thanks,
 Cat
 
 -
 
 Catherine E. Reinehr
 Webmaster  Director of Publications
 Huntingdon College
 1500 E. Fairview Ave.
 Montgomery, AL 36106
 (334) 833-4429 / Flowers 218B
 
 
 
 ___
 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 )
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkm+iocACgkQmq0JiiIWC2rBcwCeINv9NFBAnslnP/LQF/PpRpvm
qVgAnRUjz/kEpkLT9SDctRAlFqqRXcGF
=cQ9o
-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] Disabling ZEO file cache?

2009-02-02 Thread Morten W. Petersen
Hi,

how does one go about in the configuration file to disable the
ZEO file-caching feature?

-Morten
___
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-dev] Re: Sessions, ConflictError and emails

2008-02-21 Thread morten
Laurence,

thanks for the tip, exactly what I needed to know.  :-)

-Morten

On Tue, 19 Feb 2008 10:30:29 +, Laurence Rowe [EMAIL PROTECTED] wrote:
 See the discussion on plone-dev a while ago, link integrity checking
 will make Plone 3.0 broken and dangerous. Worth trying with 2.9.8 at
 least.
 
 Laurence
 
 
 
 --On 18. August 2007 21:03:43 +0200 Andreas Jung
 [EMAIL PROTECTED] wrote:
 
  
  
   --On 23. Juli 2007 08:53:32 +0200 Wichert Akkerman
 [EMAIL PROTECTED]
   wrote:
  
   Previously Andreas Jung wrote:
   Having SecureMailhost as a replacement for MailHost would have been
a
   nice addition to the Zope core..but you choose to go with your own
   implementation :-
  
   If possible I want to try and move Plone 3.5 to zope.sendmail, which
   seems to be much cleaner than all the
   MailHost/SecureMailHost/DropMailHost/etc. products combined.
  
  
  
   There is now TransactionalMailHost (on top of zope.sendmail)
  
   http://svn.zope.org/Products.TransactionalMailHost/
  
   providing transaction-aware Mailhost support + support for TLS/SSL
   (like in SecureMailHost - however it requires yet an unofficial
   zope.sendmail branch). I think this should make most Mailhost
   excrescences
   obsolete. If there is some functionalty missing I would be happy to
 add it
   (if it makes sense).
  
 
 In addition the same functionality + asynchronous mail delivery (similar
 to Maildrophost but without having an external process) will be
 available as part of the standard Zope MailHost implementation in Zope
 2.11.
 
 Andreas
 
 ___
 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-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-dev] Sessions, ConflictError and emails

2008-02-18 Thread morten
Hi,

I have a site which is based on Zope and Plone, where users can
shop around (shopping cart is stored in SESSION objects) and
a separate part of the site (backend, Plone) where newsletters
and such can be sent out.

I have a problem however with duplicate emails being sent out
to the subscribers, and this is most likely due to conflict
errors being raised..

The event.log file says:

2008-02-18T21:05:23 INFO ZPublisher.Conflict ConflictError at
/VirtualHostBase/http/www.site:80/VirtualHostRoot/levanger/plone/site_newsletter/nyhetsbrev-130208/testSendToMe:
database conflict error (oid 0x92aa, class BTrees._OOBTree.OOBTree, serial
this txn started with 0x0373d8eef99cf5bb 2008-02-18 21:02:58.503076, serial
currently committed 0x0373d8f1624479aa 2008-02-18 21:05:23.031441) (58
conflicts (0 unresolved) since startup at Thu Jan 24 17:34:08 2008)

Now, those errors aren't a big deal in themselves, but it
is a problem when the system sends out duplicate mail messages
to lots of visitors.

I've seen some blurbs about deferring sending emails until
the transaction has been completed, and I just discovered
zope.sendmail which is said to defer sending emails until
the transaction has succeeded.

Is zope.sendmail a good choice?  Will it work with Zope
2.9.8?

Thanks,

Morten

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


Re: [Zope-Annce] Re: [Zope] SQLAlchemy 0.2 released - a generic database adapter for Zope 2

2007-05-07 Thread Morten W. Petersen
Dieter Maurer wrote:
 Tino Wildenhain wrote at 2007-5-5 20:58 +0200:
  ...
 Btw, what do you think about an idea to (alternatively)
 configure db-connections in zope.conf?
 
 I like local (instance specific) configurations -- that the primary
 reason while we have the instances at all.
 
 While local configurations are possible in zope.conf, it is
 somewhat tedious (as can be seen for mount points).

Has anyone noticed the following footer on this list?

___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

  Zope-Announce for Announcements only - no discussions

No discussions ;)

-Morten
___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

  Zope-Announce for Announcements only - no discussions

(Related lists - 
 Users: http://mail.zope.org/mailman/listinfo/zope
 Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-Annce] Issue Dealer 0.9.124 released

2007-04-05 Thread Morten W. Petersen

Issue Dealer (http://issuedealer.com) is a issue management tool
featuring a weblog publisher (client), weblog (server), WebDAV client,
Mail gateway (mailing list and archive), WYSIWYG editing of HTML and
Images and more.

Changes since the last announcement:

0.9.124:

 - Added issue past due date to notification email
 - Added documentation on how to setup notifications
 - Implemented past due date listing of events

0.9.123:

 - Fixed bug where search_string wasn't found (due to
   double ??)
 - Fixed bug where some URLs included in a text were
   not detected properly

0.9.122:

 - Changed things around so that issues can have
   multiple owners
 - Implemented support for setting owner on incoming
   mail issues

0.9.121:

 - Added support for removing and adding tags to
   multiple issues at once.
 - Fixed bug where mail messages going through
   verification lost their from info.

If you're interested in trying a demo, sign up at the demo site
(http://demos.issue-dealer.net). To see the Issue Dealer Weblog Server
in action, have a look at The Blogologue (http://www.blogologue.com). :)
Nidelven IT (http://www.nidelven-it.no) and others use the product to
manage their knowledge and action items, it's a great tool to keep track
issues in different departments for example. Try it!

This release is sponsored by Nidelven IT, provider of Zope/Plone hosting
services.

___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

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


[Zope-Annce] Spaceman 1.0 released

2007-03-05 Thread Morten W. Petersen
Spaceman is a simple utility to help determine what's eating up your 
diskspace. It might just be old transactions, in which case a pack will 
do or it might be big objects somewhere.


The script can be downloaded from here:

 http://products.nidelven-it.no/spaceman

-Morten
___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

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


[Zope-Annce] Undoer (Zope Undo tool) 1.0 released

2007-03-02 Thread Morten W. Petersen

Hi,

Undoer is a product/patch that enables transactions to be undone based 
on a date. Useful if you or someone else has managed to make a lot of 
separate changes that would be cumbersome to undo the usual Zope way and 
no recent (enough) backups are available. See the Undo tab in the Zope 
Management Interface for instructions on how to use it.


Get it at

 http://products.nidelven-it.no/undoer

-Morten
___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

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


[Zope-Annce] Issue Dealer 0.9.120 released

2007-02-20 Thread Morten W. Petersen

Issue Dealer (http://issuedealer.com) is a issue management tool
featuring a weblog publisher (client), weblog (server), WebDAV client,
Mail gateway (mailing list and archive), WYSIWYG editing of HTML and
Images and more.

Changes since the last announcement:

0.9.120:

 - Added support for tagging incoming issues through
   the mail handler.

0.9.119:

 - Added ability to reschedule events directly in the
   calendar view

0.9.118:

 - Implemented filter for viewing owned/unowned issues
   on the calendar view
 - Made calendar view remember the date range viewed
   when changing display preferences

0.9.117:

 - Fixed bug where transforming the format of
   non-action issues would raise a KeyError

0.9.116:

 - Fixed bug where regular (non-action) issues would
   pop-up a message about non-existing calendars

0.9.115:

 - Added calendar selection widget for due dates
 - Fixed bug where due with either hour or minute
   set to 0 would remove all time/hour information

0.9.114:

 - Making upgrades from very old versions of
   the Issue Dealer possible
 - Removed try/except in catalog_update so that
   we can get told what's wrong
 - Implemented calendar view (for action items with due date)




If you're interested in trying a demo, sign up at the demo site
(http://demos.issue-dealer.net). To see the Issue Dealer Weblog Server
in action, have a look at The Blogologue 
(http://www.blogologue.com). :)

Nidelven IT (http://www.nidelven-it.no) and others use the product to
manage their knowledge and action items, it's a great tool to keep track
issues in different departments for example. Try it!

This release is sponsored by Nidelven IT, provider of Zope/Plone hosting
services.

___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

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


[Zope-Annce] Issue Dealer 0.9.113 released

2007-01-14 Thread Morten W. Petersen

Issue Dealer (http://issuedealer.com) is a issue management tool
featuring a weblog publisher (client), weblog (server), WebDAV client,
Mail gateway (mailing list and archive), WYSIWYG editing of HTML and
Images and more.

Changes since the last announcement:

0.9.113:

 - Cleaning up print statements
 - Fixed RDF bug on filter listing
 - Implemented full support for tags
 - Fixed bug where users couldn't validate their email

0.9.112:

 - Updated copyright period on footer
 - Added tag support to issues
 - Fixed bug where HTML mail messages were stored
   without to/cc
 - Added cleaning of incoming HTML messages
 - Overriding AbstractFormatter to format 


   tags properly in text
 - Added feedparser for paranoid cleaning of HTML
 - Implemented spam protection scheme for mail handler

0.9.111:

 - Minor fixes for escaping HTML content in the mail handler
 - Implemented threading support for mail handling
 - Implemented skipping of sending of messages to recipients
   already on To/Cc



If you're interested in trying a demo, sign up at the demo site
(http://demos.issue-dealer.net). To see the Issue Dealer Weblog Server
in action, have a look at The Blogologue 
(http://www.blogologue.com). :)

Nidelven IT (http://www.nidelven-it.no) and others use the product to
manage their knowledge and action items, it's a great tool to keep track
issues in different departments for example. Try it!

This release is sponsored by Nidelven IT, provider of Zope/Plone hosting
services.

___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

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


[Zope-Annce] Issue Dealer 0.9.110 released

2006-11-26 Thread Morten W. Petersen

Issue Dealer (http://issuedealer.com) is a issue management tool
featuring a weblog publisher (client), weblog (server), WebDAV client,
Mail gateway (mailing list and archive), WYSIWYG editing of HTML and
Images and more.

Changes since the last announcement:

0.9.110:

 - Made the Issue Dealer work with non-standard product locations
 - Implemented mail gateway (mailing list/mail archive interface)

0.9.109:

 - Removed the undefined issue type, replacing it with info
 - Fixed bug where update_catalog would choke on images without
   callable ids.

0.9.108:

 - Added ability to strip tags when importing webpages
 - Fixed bug where missing objects would raise IndexError in the 
   tree_view


If you're interested in trying a demo, sign up at the demo site
(http://demos.issue-dealer.net). To see the Issue Dealer Weblog Server
in action, have a look at The Blogologue (http://www.blogologue.com). :) 


Nidelven IT (http://www.nidelven-it.no) and others use the product to
manage their knowledge and action items, it's a great tool to keep track
issues in different departments for example. Try it!

This release is sponsored by Nidelven IT, provider of Zope/Plone hosting
services.



___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

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


[Zope-Annce] Issue Dealer 0.9.107 released

2006-08-27 Thread Morten W. Petersen
Issue Dealer (http://issuedealer.com) is a issue management tool
featuring a weblog publisher (client), weblog (server), WebDAV client,
WYSIWYG editing of HTML and Images and more.

Changes since the last announcement:

0.9.107:

  - Improved last_modified_by code.
  - Fixed numerous bugs related to security

0.9.106:

  - Added email notifications users who (un)subscribe to the weblog
  - Added last modified by attribute to issues

0.9.105:

  - Removed old, redundant code
  - Removed the alternative type
  - Made session related issues directly add/editable
  - Improved the exporting/importing of issues
  - Fixed relation listing bug
  - Re-fixed bug where notifications failed because of
a wrong set of arguments to display function

If you're interested in trying a demo, sign up at the demo site
(http://demos.issue-dealer.net). To see the Issue Dealer Weblog Server
in action, have a look at The Blogologue (http://www.blogologue.com).:)

Nidelven IT (http://www.nidelven-it.no) and others use the product to
manage their knowledge and action items, it's a great tool to keep track
issues in different departments for example. Try it!

This release is sponsored by Nidelven IT, provider of Zope/Plone hosting
services.

___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

  Zope-Announce for Announcements only - no discussions

(Related lists - 
 Users: http://mail.zope.org/mailman/listinfo/zope
 Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] Debugging spinning Zope?

2006-04-18 Thread Morten W. Petersen
Dieter Maurer wrote:
 Morten W. Petersen wrote at 2006-4-18 16:45 +0200:
 I guess the next step is to use pdb og gdb - are there perhaps any
 documents out there describing the process?
 
 You use your favorite search engine and search for Zope spinning debug.

Yep.  ;)

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


Re: [Zope-dev] New ways of getting transactions?

2005-12-11 Thread Morten W. Petersen
 This works since 2.8, but not in 2.7. Nearly every project has come 
 up with its own backward compatibility module though. See for example 
 CMFCore.utils.transaction or CMFPlone.transaction.
 
 
 I'm dispayed to hear this. :(  The old use of __builtins__.get_transaction
 should be deprecated and supported for a period of time.  If it isn't,
 then this is *definately* a bug.

I agree.  I've reported it as a bug:

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

-- 
Morten W. Petersen

Email: [EMAIL PROTECTED]
Phone: +47 45 44 00 69
Title: Project manager

Nidelven IT (http://www.nidelven-it.no)
We provide Zope/Plone hosting and consulting
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


Re: Get rid of configure/make? (was Re: [Zope-dev] Re: SVN: Zope/trunk/ Merge philikon-zope32-integration branch. Basically, this branch entails:)

2005-11-05 Thread Morten W. Petersen
 I wasn't arguing that configure/make was hard to use.  I'm arguing
 that it's something extra to maintain and is just silly.
 
 It's main benefit is that it leverages a familiar pattern, but
 I'm not convinced that it's worth it. Also, as tools like rpm and
 deb become more widely used, I'm not sure how familar the configure/make
 dance is.  Other than Python and Zope, I never use configure/make anymore.

My experience is that .rpm and .deb packages are poorly maintained, so
if someone is serious about using Zope and related products, downloading
and installing from source is the only way to go.

We also have tools internally that depend on the configure/make dance,
and I'm sure others who put up a lot of Zope instances do as well..  :)

-Morten
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


Re: [Zope-dev] Problems adding many objects

2005-09-26 Thread Morten W. Petersen
Chris,

the implementation looks like this

def manage_add_issue(self, id=None, title='', contents='',
state='', type='', referrer='', format=None,
REQUEST=None):
Add an Issue.
if id is None:
id = self.get_unique_id()
issue_ = issue(id, title, contents, state, type,
   creator=self.get_user().get_id(),
   owner=self.get_user().get_id(),
   format=format or
self.get_user_preferences().issue_format)
self._setObject(id, issue_)
self.order.append(issue_.id)
self.order = self.order
issue_ = self[id]
issue_.version = self.get_issue_dealer().version
try:
self.index_object()
except AttributeError:
pass
if referrer and REQUEST is not None:
REQUEST.RESPONSE.redirect(referrer)
print 'redirect'
else:
if REQUEST is not None:
if self.inCMF():
print 'admin url'
return self.get_admin_url()
else:
print 'manage_main'
return self.manage_main(self, REQUEST)
else:
print 'returning issue', issue_
return issue_

and before returning none, it says 'returning issue' on stdout.

-Morten

Chris McDonough wrote:
 Hi Morten,
 
 You'd probably need to show us the implementation of whatever 
 manage_add_issue is.
 
 - C
 
 
 On Sep 25, 2005, at 10:09 AM, Morten W. Petersen wrote:
 
 Hi,

 I've created a script that imports XML into the ZODB, using regular  TTW
 methods - and all is fine, except for when I import large files, with
 many objects.

 After about 288 objects, the import fails when the method that adds an
 object in the ZODB returns None, instead of the object it added.  From
 what I can tell, the added object is not None before it is  returned, but
 the name object, set via the expression

   object = self.manage_add_issue(...)

 is None.  So it looks like somewhere between 'return issue_' in
 manage_add_issue and the expression above, the object is lost.

 Any ideas what could be happening here?  I've managed to work  around it
 for now, but it is interesting nonetheless.

 Regards,

 Morten

 morten.vcf
 ___
 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 )

 
 


-- 
Regards,

Morten

Tlf:  +47 45 44 00 69
Blog: http://www.blogologue.com
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

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


[Fwd: Re: [Zope-dev] Problems adding many objects]

2005-09-26 Thread Morten W. Petersen
Oops, one for the list as well.

 Original Message 
Subject: Re: [Zope-dev] Problems adding many objects
Date: Mon, 26 Sep 2005 13:34:50 +0200
From: Morten W. Petersen [EMAIL PROTECTED]
To: Chris McDonough [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

 It doesn't say returning issue, None?  My guess is that the if 
 request is not none branch is called and it goes that way.  But  there's
 no way to know for sure without running it.

It says 'returning issue issue at x'

 This is a good place to use the Python debugger...  as the first line 
 of this method, insert import pdb; pdb.set_trace(), then start up 
 Zope in the foreground (runzope or zopectl fg), then cause the method 
 to be invoked through a browser.
 
 On the console you will see a pdb prompt.  You can step through the 
 code by using n.  To print the value of a variable type p 
 variablename, to step in to a function call press s.  When  you're
 finished, press c to continue or q to quit.  This will be  the
 fastest way to see what's happening in this method.

Yep, I'll have a go at this later.  Thanks for describing the debug
process.  :)

-Morten


-- 
Regards,

Morten

Tlf:  +47 45 44 00 69
Blog: http://www.blogologue.com
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

___
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-Annce] Issue Dealer 0.9.81 released

2005-09-02 Thread Morten W. Petersen
Issue Dealer (http://issuedealer.com) is a issue management tool
featuring a weblog publisher (client), weblog (server), WebDAV client,
WYSIWYG editing of HTML and Images and more.

Changes since the last announcement:

0.9.81:

  - Implemented asynchronous pings on the weblog

0.9.80:

  - Implemented XML import/export feature for issues and relations

0.9.79:

  - Relicensed the Issue Dealer to GPL license

If you're interested in trying a demo, sign up at the demo site
(http://demos.issue-dealer.net). To see the Issue Dealer Weblog Server
in action, have a look at The Blogologue (http://www.blogologue.com).
  :)

Nidelven IT (http://www.nidelven-it.no) and others use the product to
manage their knowledge and action items, it's a great tool to keep track
issues in different departments for example. Try it!
___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

  Zope-Announce for Announcements only - no discussions

(Related lists - 
 Users: http://mail.zope.org/mailman/listinfo/zope
 Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] Problems with Zope 2.8 on FreeBSD (was Re: Problems with PageTemplates on Zope 2.8)

2005-07-01 Thread Morten W. Petersen
I've heard of this earlier, but never experienced it until now.  :)

And yes, that was the issue!  :)

Thanks,

Morten

Andrew Sawyers wrote:
 Did you bump up the thread stack size for the python you're running Zope
 with?  This sounds like that problem.  If you search zope.org for FreeBSD -
 I have a note on how I fix it.
 
 
 Andrew
 
 --
 Zope Managed Hosting
 Software Engineer
 Zope Corporation
 (540) 361-1700 
 
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Morten W. Petersen
Sent: Thursday, June 30, 2005 7:37 PM
To: Max M
Cc: zope-dev@zope.org
Subject: [Zope-dev] Problems with Zope 2.8 on FreeBSD (was Re: Problems
with PageTemplates on Zope 2.8)


I have an application called the Issue Dealer which I'm porting to Zope
2.8.  However, whenever I try to access a PageTemplate which makes use
of a page template macro it just hangs and consumes all available CPU.

Any ideas what could be wrong here, or how I could debug it?

Does the server or the client hang?

It's the client that's hanging.  The first time I tested it, it was as a
simple Zope instance.  http://instance/manage worked fine, but accessing
an Issue Dealer instance (http://instance/stuff) didn't work.

Now when I try setting up a ZEO server/client version 2.8 with python
2.3.5 on FreeBSD 5.4, the server hangs even when I try to access
http://instance/manage.  http://instance/manage_copyright works fine
however.

-Morten
 
 
 


-- 
Regards,

Morten

Tlf:  +47 45 44 00 69
Blog: http://www.blogologue.com
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

___
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-dev] Problems with Zope 2.8 on FreeBSD (was Re: Problems with PageTemplates on Zope 2.8)

2005-06-30 Thread Morten W. Petersen
 I have an application called the Issue Dealer which I'm porting to Zope
 2.8.  However, whenever I try to access a PageTemplate which makes use
 of a page template macro it just hangs and consumes all available CPU.

 Any ideas what could be wrong here, or how I could debug it?
 
 Does the server or the client hang?

It's the client that's hanging.  The first time I tested it, it was as a
simple Zope instance.  http://instance/manage worked fine, but accessing
an Issue Dealer instance (http://instance/stuff) didn't work.

Now when I try setting up a ZEO server/client version 2.8 with python
2.3.5 on FreeBSD 5.4, the server hangs even when I try to access
http://instance/manage.  http://instance/manage_copyright works fine
however.

-Morten
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

___
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-dev] Problems with PageTemplates on Zope 2.8

2005-06-24 Thread Morten W. Petersen
Hi,

I have an application called the Issue Dealer which I'm porting to Zope
2.8.  However, whenever I try to access a PageTemplate which makes use
of a page template macro it just hangs and consumes all available CPU.

Any ideas what could be wrong here, or how I could debug it?

Thanks,

Morten

PS: CC me as I'm not on the list
begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

___
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-Annce] Issue Dealer 0.9.75 released

2005-06-10 Thread Morten W. Petersen
Issue Dealer (http://www.nidelven-it.no/products/issue_dealer) is a
issue management tool featuring a weblog publisher (client), weblog
(server), WebDAV client, WYSIWYG editing of HTML and Images and more.

This announcement covers the last 3 releases, which were mostly minor
tweaks and two major new features, the ability to add files, and the
ability to customize weblog templates.

Changes since the last announcement:

0.9.75:

  - Fixed bug where TypeError would be raised in local weblog
publisher on direct issue publishing
  - Added ability to upload files

0.9.74:

  - Added option to delete catalog
  - Cleaned up text files
  - Added info on how to handle problems

0.9.73:

  - Cleaned up weblog code
  - Refactored weblog templates for easier customization, enabled easy
access to all weblog templates through the browser

If you're interested in trying a demo, sign up at the demo site
(http://demos.issue-dealer.net). To see the Issue Dealer Weblog Server
in action, have a look at The Blogologue (http://www.blogologue.com).   :)

Nidelven IT (http://www.nidelven-it.no) and others use the product to
manage their knowledge and action items, it's a great tool to keep track
issues in different departments for example. Try it!   ;)

begin:vcard
fn:Morten Petersen
n:Petersen;Morten
org:Nidelven IT
adr:;;Postboks 923;Trondheim;;7409;Norway
email;internet:[EMAIL PROTECTED]
title:Project Manager
tel;work:+47 45 44 00 69
tel;cell:+47 45 44 00 69
x-mozilla-html:FALSE
url:http://www.nidelven-it.no
version:2.1
end:vcard

___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

  Zope-Announce for Announcements only - no discussions

(Related lists - 
 Users: http://mail.zope.org/mailman/listinfo/zope
 Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-dev] Re: Renaming a product

2003-06-18 Thread Morten W. Petersen
 Somebody correct me please, if I'm wrong, but
 
 1. tinkering with __class__ is the only way to do this.
 2. you can not tinker with __class__ of an ExtensionClass, i.e. all 
 Persistent objects.

It's not easily doable, no.  I settled on converting each instance
(copying properties) from the old product name to the new, and
it worked.

Thanks for your help everybody.  :)

Regards,

Morten W. Petersen

--
Technologies: Zope, Linux, Python, HTML, CSS, PHP
Homepage: http://www.nidelven-it.no
Phone number: (+47) 45 44 00 69


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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-dev] Renaming a product

2003-06-17 Thread Morten W. Petersen
Hi all,

does anyone know how to rename a product, so that instances of the product 
stored in ZODB will work (with the new name) after the rename?

Thanks,

Morten W. Petersen

--
Technologies: Zope, Linux, Python, HTML, CSS, PHP
Homepage: http://www.nidelven-it.no
Phone number: (+47) 45 44 00 69


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


Re: [Zope-dev] Zope builds (new Intel C++ compiler)

2002-02-14 Thread Morten W. Petersen

On Tue, Feb 12, 2002 at 12:17:28PM +, seb bacon wrote:
  However, I do build Python with gcc 3.1 (cvs) and Python 2.1.2 and with 
  various compile options can get a 17% speedup.  
 
 Could you share the compile options with us?

BTW seb, I tried compiling Python with the pgcc compiler [1] and that
gave a perfomance increase of 15% on the pystones test.

[1] http://www.goof.com/pcg/

-Morten



msg09402/pgp0.pgp
Description: PGP signature


Re: [Zope-dev] Zope builds (new Intel C++ compiler)

2002-02-12 Thread Morten W. Petersen

On Tue, Feb 12, 2002 at 12:17:28PM +, seb bacon wrote:
  However, I do build Python with gcc 3.1 (cvs) and Python 2.1.2 and with 
  various compile options can get a 17% speedup.  
 
 Could you share the compile options with us?

I'd like to see those compile options as well...

Thanks,

Morten



msg09383/pgp0.pgp
Description: PGP signature


[Zope-dev] KeyError in UnIndex

2001-10-26 Thread Morten W. Petersen

Hi guys,

I've got an issue here, the following traceback can be seen after several
users modify and view the same object in a short (2-3) minute period.

I've tried recataloging the objects but that doesn't help either;  this
error is seen every time..

 Site Error
An error was encountered while publishing this resource.

KeyError

Sorry, a site error occurred.

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 223, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 226, in
zpublisher_exception_hook
(Object: api)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: index_html)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: index_html)
  File
/usr/local/zope/lib/python/Products/warp_framework/object_manager_inter
face.py, line 88, in index_html
(Object: api)
  File /usr/local/zope/lib/python/Shared/DC/Scripts/Bindings.py, line
324, in __call__
(Object: object_manager_index)
  File /usr/local/zope/lib/python/Shared/DC/Scripts/Bindings.py, line
354, in _bindAndExec
(Object: object_manager_index)
  File /usr/local/zope/lib/python/App/special_dtml.py, line 244, in
_exec
(Object: object_manager_index)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_In.py, line 770,
in renderwob
(Object: get_meta_types)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line
231, in eval
(Object: get_number_of_objects(meta_type=_['sequence-item']))
(Info: get_number_of_objects)
  File string, line 0, in ?
  File
/usr/local/zope/lib/python/Products/warp_framework/object_manager.py,
line 115, in get_number_of_objects
(Object: api)
  File /usr/local/zope/lib/python/Products/WarpFramework/catalog.py,
line 210, in __call__
(Object: LockableItem)
  File /usr/local/zope/lib/python/Products/ZCatalog/ZCatalog.py, line
597, in searchResults
(Object: LockableItem)
  File /usr/local/zope/lib/python/Products/ZCatalog/Catalog.py, line
649, in searchResults
  File /usr/local/zope/lib/python/Products/ZCatalog/Catalog.py, line
601, in _indexedSearch
  File
/usr/local/zope/lib/python/Products/PluginIndexes/common/UnIndex.py,
line 474, in keyForDocument
(Object: PluggableIndex)
KeyError: 1074768801

Any help much appreciated,

Morten

-- 
About Thingamy:

  http://www.thingamy.com - For the CEO
  http://www.thingamy.org - The good stuff
  http://www.thingamy.net - Rants




___
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] monitor_client.py in Zope 2.4.1 not working properly

2001-09-26 Thread Morten W. Petersen

Hi,

I've been playing a bit with the monitor_client (ZServer/medusa), and it
seems all exceptions aren't raised so it's visible in the client, it's
seen in the debug output from Zope itself.

Has anyone experienced this?

-Morten


___
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] ImportError (No module names utils)

2001-09-26 Thread Morten W. Petersen

Hi,

after using a module named utils in a Zope product the root management
screen is no longer available (the module is now renamed).

The traceback looks like this:

Traceback (innermost last):
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/Zope/__init__.py, line
226, in zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: manage_main)
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: manage_main)
  File
/home/morten/tmp/Zope-2.4.1-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 324, in __call__
(Object: manage_main)
  File
/home/morten/tmp/Zope-2.4.1-src/lib/python/Shared/DC/Scripts/Bindings.py,
line 354, in _bindAndExec
(Object: manage_main)
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/App/special_dtml.py,
line 244, in _exec
(Object: manage_main)
  File
/home/morten/tmp/Zope-2.4.1-src/lib/python/DocumentTemplate/DT_In.py, line
711, in renderwob
(Object: objectItems)
  File
/home/morten/tmp/Zope-2.4.1-src/lib/python/DocumentTemplate/DT_In.py, line
839, in sort_sequence
(Object: objectItems)
  File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZODB/Connection.py, line
544, in setstate
ImportError: (see above)


Any ideas?

Thanks,

Morten


___
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] KeyError on UnIndex.keyForDocument

2001-09-26 Thread Morten W. Petersen

Hia,

While trying to reindex an entire catalog an error is raised, which looks
like this:

Traceback (innermost last):
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Zope/__init__.py,
line 221, in zpublisher_exception_hook
(Object: api)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: update_instances)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: update_instances)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/WarpFramework/catalog.py,
line 438, in update_instances
(Object: api)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/WarpFramework/catalog.py,
line 195, in __call__
(Object: Traversable)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/ZCatalog.py,
line 535, in searchResults
(Object: Traversable)
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/Catalog.py,
line 666, in searchResults
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/Catalog.py,
line 614, in _indexedSearch
  File
/home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/SearchIndex/UnIndex.py,
line 453, in keyForDocument
KeyError: (see above)


Any clues?

Thanks a whole bunch,

Morten


___
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] DISCUSS: Community checkins for CVS

2001-09-20 Thread Morten W. Petersen

On Thu, 20 Sep 2001, Paul Everitt wrote:

 So, let's begin what I'm sure will be a lively and illuminating
 discussion. :^)

First man out?  :-)

Will a ZPL-ish license [1] be accepted (declared, ref. paragraph
4 of the Zope Contributor Agreement) by the Zope Corporation?

[1] http://www.thingamy.org/tpl

-Morten


___
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] Spell checking module

2001-06-27 Thread Morten W. Petersen

On Wed, 27 Jun 2001, Remi Delon wrote:

 I have a website where users can post messages (using a textarea).
 I would like to be able to spell-check what they submit and
 notify them of possible mistakes. (much like the online
 spell-checker of hotmail that I'm using right now :-))
 
 Has anybody ever written anything for zope that does something
 similar ?

There is a spellchecker at http://www.zope.org/Members/noa

We're currently planning how to implement a new one using the pspell
library over at SourceForge:

http://sourceforge.net/projects/zope-spellcheck/

-Morten


___
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: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))

2001-06-26 Thread Morten W. Petersen

On Tue, 26 Jun 2001, Erik Enge wrote:

 On Tue, 26 Jun 2001, Morten W. Petersen wrote:
 
  How about meta-programming (designing) via the Zope interface, with
  UML or somesuch; automatically generating Python code, then enable
  designers to use a ZFormulator-ish product to edit the interface while
  a programmer can work on the 'backend' (emacs on a terminal)?
 
 What are you on my friend?  ;-)

Well, it's quite logical: UML can be used to map out both software and
business development (they are, after all, two sides of the same story),
the designer can twiddle-n-polish the interface and the programmer can
take care of 'exceptional tasks' that can't easily be taken care of via
the UML interface without adding too much complexity.

-Morten


___
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: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))

2001-06-26 Thread Morten W. Petersen

On Tue, 26 Jun 2001, Morten W. Petersen wrote:

 Well, it's quite logical: UML can be used to map out both software and
 business development (they are, after all, two sides of the same story),
 the designer can twiddle-n-polish the interface and the programmer can
 take care of 'exceptional tasks' that can't easily be taken care of via
 the UML interface without adding too much complexity.

The UML interface may be a bit far fetched, but that's because nobody has
done it yet.  ;-)

-Morten




___
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: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))

2001-06-26 Thread Morten W. Petersen

On Tue, 26 Jun 2001, Stephan Richter wrote:

 - A simple DTML Zope programmers costs are okay and maybe below programmer 
   average.
 - A good Zope/Python programmer will cost above average.
 - A good Zope/Python System-Designer is very expensive.
 
 Because of that you try to minimize the Designer's time by providing a nice 
 tool (UML tool, such as ObjectDomain). Then you try to minimize the Python 
 Programmers time by auto-generating the framework and only make him to fill 
 the methods with life. Now, because we have a UML diagram, the DTML 
 programmer can start right away with programming the DTML and HTML around 
 the data/functional model, since the API is clear. This way you optimized 
 several things:

If DTML programming / interface design is so simple, and cheap, why not
automate it?  (Strike two for low cost development).

I've been trying to save some time (and my fingers!) by building a RAD
framework, named the WarpFramework [1], which deals with the low level
complexity of properties and how to display / manipulate them in addition
to other common programming tasks.. this could perhaps blend in easily..

Say for example that we could provide the odd designer with the
possibility of simply pushing widgets and displays (generated
automatically of course) around the page, and changing colors and
backgrounds (CSS); then we have a tool that designers would love as well.

 - Minimize the time of the expensive people.

Minimize the time of people.  Period.  :-)

. o O ( Many small rivers make.. )

 - Minimize the development time, since many people can work parallel.

..lessen the complexity and add to robustness.

 - Because of the above, you minimize risk and money spent. And voila, you 
   have a well functioning RAD team.*
 
 * This assumes that your team works together well. ;-)

Well, somebody's got to do something, eh?  ;-)

[1] http://www.sourceforge.net/projects/warp-framework

Regards from France,

Morten





___
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] Re: ZPL and GPL licensing issues

2001-06-24 Thread Morten W. Petersen

On 22 Jun 2001, Simon Michael wrote:

 Now here, I have to assume RMS is using combine above to mean
 combine and redistribute.
 
 I hope I'm right ? If combine included install zwiki on your zope
 installation and use it then everything I know is wrong..  I did
 intend for that to be fairly danger-free.

I'm not sure, I've fired off another email to get a clarification.

While we're one the topic, I just read an article [1] over at Kuro5hin
that could enlighten the management over at Digicool and us as well; it
discusses the impacts of Free Software and relates it to Free Trade, talks
about barriers and other interesting things.

From the practical point of view, being able to use GPL-ed software with
Zope is a Good Thing (TM) for most developers.

Another thing is that some people / companies may be reluctant to add
signifcant modules that could be included in the Zope core, as they will
not get the same level of recognition for their work as Digital Creations
would.

For me personally, a Zope license without the advertising clause would
motivate me, as the 'protection barrier' / 'restriction' / 'attribution
issue' wouldn't be there;  I have a ton of things I'd like to change in
Zope and add to Zope, and as time goes by, the who-gets-credit-issue will
undoubtedly be raised again, if we're so lucky that Digicool decides to
open up Zope for read/write CVS access.

[1] http://www.kuro5hin.org/?op=displaystory;sid=2001/6/23/3451/16661

-Morten



___
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] ZPL and GPL licensing issues

2001-06-22 Thread Morten W. Petersen

On Fri, 22 Jun 2001, Erik Enge wrote:

 Now I think I have two different answers to one of my fundamental
 questions in this discussion: if I have a GPL-compatible licensed product
 and I distribute it with a GPL product, do I need to relicense the former
 one to GPL?  Because that is what I understand you to say.  Others have
 said the opposite.

Yes, you can distribute a GPL-compatible licensed code with GPL
licensed code without licencing the former under GPL.  Take a look in the
Linux-kernel source tree for example.

And yes, it would be very interesting to see the underlying reason(s) for
the ZPL..

Regards,

Morten


___
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] ZPL and GPL licensing issues

2001-06-22 Thread Morten W. Petersen

On Fri, 22 Jun 2001, Erik Enge wrote:

 Ok, good.  Then Thingamy's intermediate solution will be to create a TPL
 which is basically the ZPL with the incompatible-clauses ripped out
 (number 4 and 7, I think).  That way we are compatible with both the ZPL
 and the GPL.

Something like that.  Verifying the license with the GNU people now.

-Morten


___
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] Re: ZPL and GPL licensing issues

2001-06-22 Thread Morten W. Petersen

On 22 Jun 2001, Simon Michael wrote:

 Shane Hathaway [EMAIL PROTECTED] writes:
  One of the consequences being that someone re-distributing zope 
  zwiki together, under their default licenses, is technically in
  violation right now, I think we are all agreeing.
  
  Technically yes, although I like to think that the product developers
  implicitly grant redistribution permission by attempting to apply the
  GPL.
 
 I'm not sure that would be a valid assumption. Speaking for myself, it
 wasn't my particular intention to unconditionally grant that
 permission given the licenses as they stand. I mean, I didn't intend
 that zwiki's GPL be some kind of watered-down GPL. :)

May Stallman forgive me (fun intended :-):


Date: Thu, 21 Jun 2001 16:43:05 -0600 (MDT)
From: Richard Stallman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Mixing different licences
 
Another question is whether or not it's legal to use GPL-ed Zope
products with Zope.
 
That is a hard question.  I don't know whether Zope is just an interpreter
or contains facilities that, in effect, the user program links with.
It makes a difference.
 
If the former, you can run programs on Zope regardless of their
licenses.
 
If the latter, then in general, you can't take someone's GPL-covered
code and combine it with Zope, because the Zope license is
GPL-incompatible.
 
If someone wrote a GPL-covered program specifically for Zope, you are
pretty safe taking that as implicit permission to combine it with
Zope.  But it would be better for them to give explicit permission.


Implicitly yours,

Morten


___
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] ZPL and GPL licensing issues

2001-06-20 Thread Morten W. Petersen

Hi there,

we @ thingamy are considering changing our license to a ZPL-ish one [1] to
better serve our clients' needs.  However, some of the (Zope) products
we've developed may need to rely on GPL'ed code, or needs to be
incorporated within it, and the 'obnoxious advertising clause'
seemingly puts a stop to it..

The ZPL is listed as a license incompatible with the GPL, but it doesn't
really say clearly what the reason is, as far as we can figure, it's
because of the advertising clause.

Anyways, I'm wondering if any of you have encountered the same issue
developing Zope products and any solutions towards it.

Some interesting articles, food for thought:

http://www.zdnet.com/enterprise/stories/main/0,10228,2777053,00.html
http://www.gnu.org/philosophy/license-list.html#GPLIncompatibleLicenses
http://www.gnu.org/philosophy/bsd.html

[1] http://www.thingamy.com/tpl

Regards,

Morten


___
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] command-line zope.org product upload ?

2001-06-19 Thread Morten W. Petersen

On Tue, 19 Jun 2001, Andy McKay wrote:

 Ive been successfully finding other things to do other ZPM which is an
 attempt to make a package manager for Zope ala RPM, PPM etc. A command line
 interface to it would be cool.

Cool.  And maybe some apt-get functionality?  Like 'zope-apt-get
dist-upgrade'?  :-)

Cheers,

Morten


___
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] Where did DocumentTemplate/VSEval.py go in 2.4.0a1?

2001-06-15 Thread Morten W. Petersen

On Fri, 15 Jun 2001, Evan Simpson wrote:

 Morten W. Petersen wrote:
 
  one of my products landed flat on its face when an ImportError was raised
  trying to import VSEval from DocumentTemplate;  is there a new class /
  function of some sort or simply another name for the class?
 
 See $ZOPE/lib/python/RestrictedPython.  That replaces both 
 DocumentTemplate's VSEval and PythonScripts' zbytecodehacks.  It 
 contains an Eval class that should be drop-in compatible with the old one.

Ok, (for future reference) replacing all the VSEval.Eval references with
Eval.RestrictionCapableEval fixed it.

Thanks  Cheers,

Morten


___
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] TypeError on FieldIndex

2001-06-15 Thread Morten W. Petersen

Hia guys,
 
running the GUM product on a fresh BerkeleyDB based 2.4.0a1 instance on
Linux raises the following issue for the field index type:
 
Site Error
 
An error was encountered while publishing this resource.
 
Error Type: ('type', 0, type 'string', type 'int')
Error Value: None
 
 
Troubleshooting Suggestions

The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering
an error.
 
For more detailed information about the error, please refer to the HTML
source for this page.
 
If the error persists please contact the site maintainer. Thank you for
your patience.
Traceback (innermost last):
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Zope/__init__.py, line
226, in zpublisher_exception_hook
(Object: CatalogAware)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: index_html)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: index_html)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/App/special_dtml.py,
line 127, in __call__
(Object: index_html)
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/DocumentTemplate/DT_String.py,
line 543, in __call__
(Object: index_html)
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/DocumentTemplate/DT_In.py,
line 681, in renderwob
(Object: get_incoming_message_containers)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/GUM/gum.py,
line 591, in get_incoming_message_containers
(Object: CatalogAware)
  File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/GUM/gum.py,
line 858, in get_gum_message_containers
(Object: CatalogAware)
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/ZCatalog.py,
line 582, in searchResults
(Object: LockableItem)
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/Catalog.py,
line 663, in searchResults
  File
/home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/Catalog.py,
line 550, in _indexedSearch
('type', 0, type 'string', type 'int'): (see above)
 
I added an extra try except block:
 
if request.has_key(index.id) :
try:
   if len(request[index.id])0:
r=index._apply_index(request)
except:
   raise str((index.id, request[index.id],
type(index.id), type(request[index.id])))
 
The original exception was a TypeError, len() of unsized object.

Cheers,

Morten


___
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] Non-undoable storage

2001-06-12 Thread Morten W. Petersen

Hia guys,

during testing of a mail product I've discovered that the Data.fs file may
bloat considerably after storing 50 messages.  Packing the database will
reduce the Data.fs file to 20 MB (from 40 MB).  Another thing is that
storing 50 messages takes a *long time* on a 600Mhz 256 MB RAM system.

The thing that struck me was that transactions may cause a lot of
overhead, both in database size and for execution speed, so, the thing I'm
wondering about is if there exists a non-undoable storage, or something
similar that doesn't support transactions..

Another thing I noticed BTW, is that retrieving 500 messages and packing
the database on every 50th message (all messages retrieved during one
request) would lead to off the charts memory usage, the process ended up
using 700 MB of RAM (had to add swap files as the footprint grew!)

Cheers,

Morten




___
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] Non-undoable storage

2001-06-12 Thread Morten W. Petersen

On Tue, 12 Jun 2001, Shane Hathaway wrote:

 Did you catalog each message?  What version of Zope?

Yes, every message was cataloged.  Zope version 2.3.2

 3) Manually zap the caches periodically, which is a capability of Zope
 2.4.x.

Okay, this is interesting.  Any examples on how to implement cache 
zapping? 

Cheers,

Morten


___
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] Non-undoable storage

2001-06-12 Thread Morten W. Petersen

On Tue, 12 Jun 2001, Chris McDonough wrote:

 Morten W. Petersen wrote:

  Yes, every message was cataloged.  Zope version 2.3.2
 
 Were subtransactions in the Catalog turned on (see the Advanced page)?

Yes, and the threshold was at 1.

-Morten


___
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] Building custom DTML tags and accessing _.something

2001-05-09 Thread Morten W. Petersen

Hia guys,

I was wondering if any of you could give me a couple of hints about how to
make the _.{random,string,range,Datetime} thingies from a tag expression.

I.e. instead of doing this:

dtml-widget select options=[1,2,3,4,5,6,7,8,9,10,11,12,13]
selected=[1,3,5,7,9,11,13

This could be done:

dtml-widget select options=_.range(1,14,1)
selected=_.range(1,14,2)

Like this (with the DTML var tag):

dtml-var [1,2,3,4,5,6,7,8,9,10]

dtml-var _.range(1,11)

Thanks  cheers,

Morten


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

2001-04-28 Thread Morten W. Petersen

Hia guys,

A couple of comments and questions about the ZCatalog:

Is it possible to pass an argument to the catalog so that returned brains
would instead be actual objects?

Given that we have to manually join search results, because ZCatalog
doesn't support ORs etc (for FieldIndexes), wouldn't it be useful to have
some sort of tool that could take a set of results, and return a result
with only unique values?

Cheers,

Morten



___
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] REQUEST and values stored there

2001-04-04 Thread Morten W. Petersen

Hia guys,

the recent changes to the HTTPRequest class breaks some of my
code.  I may have missed some notifications, but why wasn't
this made clear as it could obviously break code?

-Morten


___
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] REQUEST and values stored there

2001-04-04 Thread Morten W. Petersen

On Wed, 4 Apr 2001, Chris McDonough wrote:

 What breaks?  There was no intention to break code or change the API.

Code that looked like this:

REQUEST['key_name1']
REQUEST['key_name2']

Now has to be changed to this:

REQUEST.form['key_name1']
REQUEST.form['key_name2']

(The former method raises a KeyError.)

These problems started to appear in the 2.3.x tree.

-Morten


___
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] INSTANCE_HOME vs. SOFTWARE_HOME

2001-03-18 Thread Morten W. Petersen

Hi guys,

some people have asked me to use INSTANCE_HOME instead of SOFTWARE_HOME,
which breaks their products on debian distros.

Now, I'm not sure that won't break other systems if I change it; anyone
care to share?

Thanks,

Morten


___
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] Permission problems

2001-03-13 Thread morten

Hi guys,

I've been struggling with some permission problems, and I'd appreciate
some help...

Being that I don't know too much about permissions (yet!), solving
this issue is hard (and security _is_ hard); so I'll just point
you to the problem: 


http://www.zope.org/Members/morphex/AddressBook/address_book-1.0.0-permission_problems.tar.gz

Just read about the SecurityClass stuff in AccessControl, but can't
quite gripe that either.  Anyone care to enlighten a security newbie? :-)

Thanks,

Morten



___
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] Ensuring 'freshness' of dynamic pages (slightly offtopic)

2001-03-11 Thread Morten W. Petersen

Hi guys,

I've been trying to ensure that documents from a certain website are
always fresh, that is, every request for a new page must be validated
before the client sees it.

I've tried using these HTTP Cache-control directives:

no-cache
no-store
max-age (1)
must-revalidate

but no such luck.  If I for example specify 'Check against server: Never'
in IE, the pages are cached, no matter what.

Is it possible to ensure that pages are always fresh, even if it is
specified on the client side that the client should never try to
retrieve a 'fresher' page?

I've been contemplating a new solution, which is to append a string
like ?ensure_freshness=02349025180.12 (some random, unique id) on each
link, but that's not a thing which I wish to do now, at such a late
stage in the project.

Also, it strikes me that it isn't possible to specify multiple
cache-control directives with the current HTTPRequest implementation,
am I missing something here, or is this a bug / missing feature?

Any ideas?

Thanks,

Morten



___
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] ZPatterns, DynPersist.dll and Zope 2.3.0

2001-03-04 Thread Morten W. Petersen

Hi guys,

I've got a problem making a version of the DynPersist.dll file work
on windows.  The message when trying to load the DynPersist module
says (paraphrasing) "A unit attached to the system doesn't work".
Anyone else experienced this?

Also, I read that users of  Zope 2.2.x could skip this module,
is there any quick hack to fix this?

Thanks,

Morten

___
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] ZPatterns, DynPersist.dll and Zope 2.3.0

2001-03-04 Thread Morten W. Petersen

[Steve Alexander]

| Try this one:
| 
|http://www.cat-box.net/steve/DynPersist-0.4.3b1.dll
| 
| I've had this one working on Windows 2000, Zope 2.3.

Yep, this works.  On Windows 98 with Zope 2.3.0.

Thanks again,

Morten

___
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] ZCatalog hackery

2001-03-03 Thread Morten W. Petersen

[Chris McDonough]

| Note that the algoritm is simple - for each index, compare the what exists
| in the index to what is to be put in.  If they're the same, do nothing.  If
| they're different, reindex.  I wasn't able to understand completely from
| your description whether the object method your're attempting to index via a
| TextIndex actually returns different data or not when you recatalog it.
| Does it?

Will the new data be 'made ready for indexing' before it is compared to the
existing data?  That is, will ZCatalog have to compute the data in some
way before it compares it to what is already stored?

I'm wondering because it would be significant overhead to 'make a data field
of 100MBs into an index-like value' and then compare it to what already
exists in the ZCatalog.

Thanks,

Morten

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

2001-03-01 Thread Morten W. Petersen

Hi guys,

I've got a problem with ZCatalog.  I've got plenty of large
objects, ranging from 100KB to 100MB in size.  Needless to
say, these take up a lot of processor time when indexed by
the ZCatalog.

Now, these object have to be moved from time to time, only
moved, so that one or two of the related columns and indexes
are affected (the path and the parent container id); is
there a way to go around this so that those two, the
one column and the index are updated, and not, let's say
the indexed body (which is 100KB - 100MB in size) ?

Thanks,

Morten

___
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] ZCatalog hackery

2001-03-01 Thread Morten W. Petersen

[Casey Duncan]

| Actually what I wrote assumes you are passing a Catalog not a ZCatalog.
| So you will need to change it for a ZCatalog to:

I figured that out.  :-)

There is one problem, the uids stored in the Catalog are based on the path of the
object, so I guess I'll have to make a copy of the records, and then paste it in
under the new uid (path).

-Morten

___
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] Synchronize GUD or Worldpilot with IPAQ

2001-02-28 Thread Morten W. Petersen

[Valérie Aulnette]

| Did someone try ? And how ?

You can't synchronize at this point.  It's a planned feature, but
don't hold your breath.  :-)

Cheers,

Morten

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

2001-02-26 Thread Morten W. Petersen

Hi guys,

I'm having trouble making ZCatalog work.  The problem is that
there are 29 objects of a given meta type, with the same
booleans that should be returned for an iteration; but only
20 are.  Is this a result of caching perhaps?  Or lazy
results?

Thanks,

Morten

___
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] catalog object owners?

2001-02-26 Thread Morten W. Petersen

[Tim McLaughlin]

| Anybody know how to catalog the object "owner"?  I can't seem to find a
| property to catalog the value of getUserName().  (of course I could always
| kludge it with a property in the constructor, but I would prefer use what is
| already there).

I'll second that, the ability to catalog values returned by method calls
would be sweet..

-Morten

___
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] catalog object owners?

2001-02-26 Thread Morten W. Petersen

[Chris McDonough]

|  I'll second that, the ability to catalog values returned by method calls
|  would be sweet..
| 
| Not sure what you mean, this works now.

Aha?  So if I specify a field index of, get_parent_node_id, which is a
function call on all objects that are to be indexed, this would
index the returned value?

If so, how long has this been available?

Cheers,

Morten

___
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] Minor typos/changes to ZCatalog.

2001-02-24 Thread Morten W. Petersen

[Steve Alexander]

| But it's not just characters. A field index indexes an object, and uses 
| the overloaded comparison operators for that object to put it in an 
| appropriate place. So, you can index DateTime objects, tuples, strings, 
| numbers, floats...

Could a field index succesfully handle the example you posted some
time ago, storing the relative path of each object?

-Morten

___
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] Storing lots of big objects in containers

2001-02-24 Thread Morten W. Petersen

[Erik Enge]

| Can't you just subclass the BTree Folder as you would with OFS.Folder?
| 
| I think you might be confusing the Zope BTree implementation with the
| BTree Folder Product?

I've tried subclassing BTreeFolder, but then, whenever the object is
accessed, zope falls flat on its face.  :-\

Tried again, now this error is raised:


"""
 Zope Error
Zope has encountered an error while publishing this resource. 

TypeError

Sorry, a Zope error occurred.

Traceback (innermost last):
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 187, in 
publish
  File /home/morten/Zope-2.3.0-src/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: CatalogAware)
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 171, in 
publish
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: retrieve_messages)
  File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
(Object: retrieve_messages)
  File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 579, in 
retrieve_messages
(Object: CatalogAware)
  File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 655, in 
_retrieve_messages
(Object: CatalogAware)
  File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 986, in 
drop_message
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/RFC822Message/util.py, line 86, in 
store_message
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/RFC822Message/rfc822_message.py, line 66, 
in manage_add_rfc822_message
(Object: CatalogAware)
  File /home/morten/Zope-2.3.0-src/lib/python/OFS/ObjectManager.py, line 285, in 
_setObject
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/BTreeFolder/BTreeFolder.py, line 187, in 
_setOb
(Object: CatalogAware)
TypeError: object does not support item assignment
"""

*sound of headscratching*

-Morten

___
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] REQUEST acting up and misplacing form elements in other

2001-02-23 Thread Morten W. Petersen

Hi zopers,

I've been wondering what may be causing the REQUEST object to
store form values in the other dictionary.  Is this a new
feature or simply a bug?

Cheers,

Morten

___
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] ConflictErrors and how to handle them

2001-02-19 Thread Morten W. Petersen

Hi guys,

I've been struggling with a problem, namely ConflictErrors.

At times, a long-running process may add 100, 1000, 1
objects to a single folder.  Under this process, several
ConflictErrors may be raised, but they are captured, and
the transaction committed again.  Problem solved.

However, the other side of the problem is that regular
requests, from other users, may be be aborted, and as a
result the user is presented with a Zope Error screen,
which says ConflictError.

If I've understood this correctly, it is because the
ZODB connection is hosed, and innocent reads trigger
ConflictErrors.

So, I'm wondering about turning up the number of Exceptions
each request may handle (it's 3 now, right?) and just
hope that the exception isn't raised more than 10-20
times.

Where can I increase the number of accepted exceptions
per request?

Any thoughts on the solution itself?

Cheers,

Morten

___
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] Getting the parent of a container in a Python Script

2001-02-15 Thread Morten W. Petersen

[Cyril Elkaim]

|Hi all,

Hia Cyril,

[snip]

| Aside from my problems Zope rocks really.

Yes it does.  And you can find usable information in
$ZOPE_INSTANCE/lib/python/OFS/ZDOM.py .

Hope this helps,

Morten

___
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] 2gb ZODB size limit

2001-02-15 Thread Morten W. Petersen

[Tim McLaughlin]

| Is this true on windows too?  I saw some mention of this limit be lifted,
| but if so, in what version?

It's not a problem on Windows, AFAIK.  It's a problem with Linux, if
you want to be able to use databases  2GB in size on Linux, a
kernel = 2.4.0 is required.

Hope this helps,

Morten

___
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] 2gb ZODB size limit

2001-02-15 Thread Morten W. Petersen

[Andy McKay]

| Yes, you will hit this limit. Windows uses a 32 bit integer for file size...
| No matter what MS says, Ive hit it on Win2k.

Interesting.  Are you sure the problem lies with Win2K and not Python or
something else?

Cheers,

Morten

___
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] 2gb ZODB size limit

2001-02-15 Thread Morten W. Petersen

[Erik Enge]

| [Morten W. Petersen]
| 
| | It's a problem with Linux, if you want to be able to use databases 
| | 2GB in size on Linux, a kernel = 2.4.0 is required.
| 
| Nope.  First, the limit is at file-level, not database-level (mind
| you, a problem with the filesystem, not Linux per se).  You can have
| tons and tons of files, but noone of those can be over 2GB.

FileStorage type database was implicit, as we're discussing ZODB,
and that's one file per database.

| Secondly, this is only true for the ext2 (and «lesser» filesystems).
| ReiserFS does not have this limitation and I've heard that is supposed
| to be shipped «batteries included» come 2.4.1.

Sorry?  Didn't I say kernel version 2.4.0 or greater?  The 2GB problem
(in ext2) is fixed there you know.

..and a side note for ReiserFS, I've had it mess up a filesystem
completely, so much for 1 second recovery after a crash.  ;-)

BTW, there is a list called [EMAIL PROTECTED], for ZODB specific
questions.

Cheers,

Morten

___
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] 2gb ZODB size limit

2001-02-15 Thread Morten W. Petersen

[Erik Enge]

| [Morten W. Petersen]
| 
| | BTW, there is a list called [EMAIL PROTECTED], for ZODB specific
| | questions.
| 
| Actually, I think its called ZODB-Dev; [EMAIL PROTECTED]

I stand corrected.

Cheers,

Morten

___
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] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen

[Erik Enge]

| What happens if you run this with ZEO?  Will the file be kept «in
| sync» with all ZEO Clients?

Good point. I don't think so.  It could be that it is kept in sync
with one Zope instance "being responsible" and the others calling
it via XML-RPC.

Cheers,

Morten

___
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] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen

[Wolfgang Strobl]

| Doesn't even install on Windows, because it imports and uses fcntl.
| 
| From the fcntl docs: "Availability: Unix".

Well, the download page says "Platform: Generic UNIX-like", doesn't it?

-Morten

___
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: ThreadSafeCounter

2001-02-12 Thread Morten W. Petersen

[Andy McKay]

| I released FSPoll recently and was going to combine the two into one
| FSCountThing with FSPoll and FSCounter subclassing of it, so maybe we could
| co-operate on ThreadSafeCounter and FSCounter?

The ideal solution would be to use an object that lives in the ZODB, I wonder
if there is a way to keep the 'object history' empty?  That is, keeping
the counter 'packed' while retaining 'object history' information on all other
objects.

In any case, I think it's possible to implement a file-locking module,
that locks the file using a .lock extension (writing the pid of the
locking process to that file) or something like that..  Which should
work on Linux and Windows (and most other OS')

Should I toss up a Wiki?

Cheers,

Morten

___
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] ThreadSafeCounter 0.0.1 released

2001-02-12 Thread Morten W. Petersen

[Erik Enge]

| Forget it.  My fault.  *shame, shame*

*chuckle*  :-)

-Morten

___
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] ThreadSafeCounter 0.0.1 released

2001-02-11 Thread Morten W. Petersen

[Chris Withers]

| So would a counter such as:
| 
| class PersistentCounter(Persistent):
| 
| # create the counter
| def __init__(self, value=0):
| self._value = value
| 
| # get the value of the counter without incrementing
| def getValue(self):
| return self._value
| 
| # increment the counter when called, and return the new value
| def __call__(self, number=1):
| self._value = self._value + number
| return self._value
| 
| ...not be thread safe?

I'm not sure whether the code above is thread safe or not.  ThreadSafeCounter was
made because

I don't know enough about Zope internals to determine whether
or not the counter would return unique values, nor do I
know enough about threads to be completely sure that it
would, every time.

File locking is a simple concept, and easy to understand.

As I've understood it, two threads serving requests have a copy each of the
database, and only when changes are committed are they reflected in
the database.  Therefore, two requests created at the same time could
get an identical copy and therefore and identical value.

..so, it basically boils down to the fact that it's simple to use file locking.

Cheers,

Morten

___
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] LONGing for normal inetegers...

2001-02-11 Thread Morten W. Petersen

[Jon Franz]

| I had this problem in the past and hacked the mysql DA to fix it, then
| dicovered to my dismay I was using an out-of-date mysqlDA and it had already
| been fixed... Which DA are you using?

Using Python 2.0 could solve this problem, as longs are no longer rendered
with the L suffix.

HTH.

-Morten

___
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] ThreadSafeCounter 0.0.1 released

2001-02-10 Thread Morten W. Petersen

Hi guys,

There's a new product available, which enables unique ids in a given context,
take a look at url:http://www.zope.org/Members/morphex/ThreadSafeCounter.

Cheers,

Morten

___
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] ValueChecker 0.0.1

2001-02-07 Thread Morten W. Petersen

Hi zopistas,

I've managed to build a product called ValueChecker which when installed
hooks into the prosessing of form input.

It's basic at this point, a mere proof-of-concept, but I can think of
so many uses!

Cheers.  :-)

-Morten

___
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] The field converters (:int, :text, etc.)

2001-02-04 Thread Morten W. Petersen

Hi guys,

IIRC, there was some talk about modularizing the field
converters (checkers) so that they could be easiliy modified
and added to.  Is there currently any efforts to solving
this problem?  If not, there's definently a need for it,
IMO..

Thank you for your time.

-Morten



___
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] ZClasses vs. Python Products

2001-02-03 Thread Morten W. Petersen

On Sat, 3 Feb 2001, Steve Alexander wrote:

 Sounds to me like your needs would best be served with two
 related products: a TTW ZClass product and a Python Product.
 Each ZClass is derived from an associated Python base class.
 
 You get to keep you flexibility, but also get the advantages
 of TTW development when you need it.

Ahah!  That's a very good (and simple) solution.
Thanks for the help!

-Morten (who still wants to add HTMLFile and Image editing
TTW for Python based products).


___
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] Creating IMAP and SMTP services for Zope

2001-02-03 Thread Morten W. Petersen

Hi guys,

I'm wondering about creating IMAP and SMTP services for Zope.
Someone mentioned to me that extending (using?) the ZServer
could be a Good Thing (tm).

Could anyone point me in the right direction?

Thanks.

-Morten



___
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] LoginManager and ZPatterns

2001-01-29 Thread Morten W. Petersen

Hi fellow zopers,

I don't know if it's a bug or feature, but whenever I try
to access parental objects from a user object in python
code, I can't seem to find anything.

That is, whenever I call acl_users.getItem('user123').getParentNode()
(the acl_users is a LoginManager instance) it returns None.  But,
if it's called from DTML, with exactly the same expression, it returns
the containing object...

Could someone shed some light on this?

Thank you.

-Morten

___
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] How to avoid ConflictErrors ?

2001-01-28 Thread Morten W. Petersen

Hi zopers,

I'm having problems with a product I'm developing.  The product is part of the
ZopeGUM package, the GUM product.  If you have a look in gum.py in that
product, you can see a method named _retrieve_messages, which can at
times store enourmous amounts of objects and data in one transaction.

Now, if I access the GUM instance at the same time as this method is being
called, I may either get a ConflictError raised in the page, or in the
Zope debug output. 

I've read all the posts I could find regarding ConflictErrors, and they
mention that careful programming could help in avoiding these exceptions.
I'm assuming that this applies only to whenever two threads are trying
to *modify* the same object; and frankly, I can't see where I'm modifying
any objects, unless modifying one object, an rfc822_message instance in
a message_container instance also somehow modifies the message_container.

Any idea what I'm doing wrong?

Thanks  cheers,

Morten

___
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] How to avoid ConflictErrors ?

2001-01-28 Thread Morten W. Petersen

[Chris Withers]

| Please check that both rfc822_message and message_container subclass
| Persistence.Persistent.

They do.  *ponder*

-Morten

___
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] AttributeError when adding ZClass product (PortalMembership)

2001-01-26 Thread Morten W. Petersen

Hi guys,

I have a problem with a product.  This product, let's call it product
SuperSecret, adds a number of folderish objects to the new instance
when it is created.  Now, if we name the SuperSecret product instance for
a, and the class instance that raises the AttributeError b, I
will show you what happens:

I am at the root folder of the Zope instace, and select the SuperSecret
entry from the Products list.  There I enter the relevant information,
and submit the form.  But then, the SuperProduct raises an exception
when the manage_add_some_class function tries to add the new b instance
to the a instance.  (No exception is raised when the offending line
which tries to access the Control_Panel via the b instance  acquisition
is commented out).

The manage method, which looks like this:

def manage_add_b(self, id, description, REQUEST=None):
"Add an instance of the b class."

self._setObject(id, b(id, description))
#get_transaction().commit()
Shared.utils.install_authentication_folder(self[id])

which calls an external function, which looks like this:

def install_authentication_folder(container):


container.Control_Panel.Products.PortalMembership.doInstall(folder=container, 
REQUEST={})

which raises an AttributeError that looks like this:

   Zope Error

   Zope has encountered an error while publishing this resource. 

   Error Type: AttributeError
   Error Value: Control_Panel

   [...]

  File /home/morten/Zope/lib/python/Products/rs/rs.py, line 56, in manage_add_a
  File /home/morten/Zope/lib/python/Products/SuperSecret/a.py, line 168, in 
__init__
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/SuperSecret/b.py, line 61, in 
manage_add_b
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/Products/SuperSecret/Shared/utils.py, line 
211, in install_authentication_folder
(Object: CatalogAware)
  AttributeError: (see above)

Now, I guess this could be because the new instance isn't aware of it's
surroundings, but I've tried to manually commit the transaction (which
could help?), but obviously didn't...  =)

I guess it could be a solution to call a number of methods after the
product instance is added, but that's a bit too hackish for me.

Any ideas?

Thanks in advance,

Morten

___
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] Implementing a URL path resolver

2001-01-18 Thread morten

Hi guys,

I've been tinkling with a function that does what REQUEST.resolve_url does,
except without it relying on having a REQUEST instance available.

That is, just resolving the path itself, something like this:

path ÿstring.split(relative_url, '/')
path ÿfilter(None, path)
new_path ÿ'%s' % path[0]
path ÿpath[1:]

for element in path:

new_path ÿnew_path + "['%s']" % element

return eval("self%s" % new_path)

Now, neither []- or .-like evaluation of the path works..

Any ideas?

Cheers,

Morten


___
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] Implementing a URL path resolver

2001-01-18 Thread Morten W. Petersen

[[EMAIL PROTECTED]]

(Bug in the encoding of the message, MHA)

| path = string.split(relative_url, '/')
| path = filter(None, path)
| new_path = '%s' % path[0]
| path = path[1:]
| 
| for element in path:
| 
|   new_path = new_path + "['%s']" % element
| 
| return eval("self%s" % new_path)

-Morten

___
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] Implementing a URL path resolver

2001-01-18 Thread Morten W. Petersen

[Steve Alexander]

| Have you seen the methods restrictedTraverse and unrestrictedTraverse in 
| lib/python/OFS/Traversable.py ?

Exactly what I needed.  Thank you.

-Morten

___
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] Calling HTMLFiles

2001-01-18 Thread Morten W. Petersen

Hi,

I'm having difficulties calling an HTML file from python..

Here's the code:

[...]
from events import conflicting_events

calendar_event_add_redirect = HTMLFile('calendar_event_add_redirect',
globals())
manage_add_calendar_event_form = HTMLFile('calendar_event_add', globals())
conflicting_events_dialogue = HTMLFile('calendar_event_conflicting_events_dialogue', 
globals())

# These two expand into seconds
expand_hour = lambda x: x * 60 * 60
expand_minute = lambda x: x * 60

def manage_add_calendar_event(self, title='', note='',
alarm=0, start=0, end=0,
priority=0, status=0,
REQUEST=None, RESPONSE=None):
"Add an instance of the calendar_event class."

new_id = str(self.get_unique_id())

if REQUEST:

alarm = expand_hour(REQUEST['alarm_hour']) + \
expand_minute(REQUEST['alarm_minute'])

start = expand_hour(REQUEST['start_hour']) + \
expand_minute(REQUEST['start_minute'])

end = expand_hour(REQUEST['end_hour']) + \
expand_minute(REQUEST['end_minute'])

title = REQUEST['title']
note = REQUEST['note']
priority = REQUEST['priority']
status = REQUEST['status']


conflicting_events_ = self.check_timespan(
self.getParentNode().getParentNode().id,
self.getParentNode().id, self.id,
start, end)

if conflicting_events_:

return conflicting_events_dialogue(self, REQUEST)
[...]

Now, if there are any conflicting events, the HTMLFile is returned, with
some parameters passed along.

What I'm wondering about is how can I pass the variables defined
in the REQUEST so that they can be looked up with dtml-code in
the conflicting_events_dialogue?

And doing it without raising KeyErrors on DTMLMethod that are
called from within the conflicting_events_dialogue?

Thanks.

-Morten


___
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] Re: [Zope-dev] ZCatalog and 'fuzzy logic'

2001-01-10 Thread Morten W. Petersen

 I do not think that "fuzzy logic" is strongly related to "regexp-like".
 Anyway.
 
 Fuzzy searching often means "finding matches with characters omitted,
 replaced or inserted".

It seems I misunderstood the term fuzzy logic myself.  Fuzzy logic means
if I search for a word, for example 'programmer', it will return matches
to the words 'program', 'programming','programmable' etc.

I.e., it will somewhat intelligently return words that are similar in
what they mean, using grammar rules (chopping off endings of words and
making them match others).

Hmm.

Cheers,

Morten


___
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] ZCatalog and 'fuzzy logic'

2001-01-09 Thread Morten W. Petersen

Is there anyone who could try to give an estimate of how long it would
take to add fuzzy logic (regexp-like) searching capability to the
ZCatalog?

And reasoning as to why would be appreciated. ;)

-Morten


___
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] ZCatalog and 'fuzzy logic'

2001-01-09 Thread Morten W. Petersen

Is there anyone who could try to give an estimate of how long it would
take to add fuzzy logic (regexp-like) searching capability to the
ZCatalog?

And reasoning as to why would be appreciated. ;)

-Morten


___
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] Lobbying (was: [Zope] html_quote in python methods?)

2001-01-03 Thread Morten W. Petersen

[Chris Withers]

| I'll second this. It'd be _so_ nice...
| 
| ever wanted to do:
| 
| dtml-call "somemethod(absolute_url()+urlquote(_.getitem(id))"

I totally agree.

-Morten

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




  1   2   >