Re: [Zope-dev] nasty persistence problem

2001-10-15 Thread Michel Pelletier

Tim McLaughlin wrote:
 
 Thanks Chris, I'll hold on to that for a rainier day.  I just worked
 this one out in a very roundabout way ;)
 
 A product had gotten copied in that moved a Product class from one
 module to another even though everything else was the same.  It seems
 that ZODB doesn't like that. 

It sure doesn't.  When it pickles an object, it says, here's a big
binary blob that is the state of the object.  The code for the object
can be found in Products.MyProduct.MyModule.MyClass.  When you move the
code, ZODB understandably barfs.

If I remember correctly, there is a way to make an alias in an old
location that points to a new location when you *must* move the code for
whatever reason.  I forget how it works though...

-Michel

___
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] A modest proposal: Replace medusa with Twisted

2001-10-10 Thread Michel Pelletier

On Wed, 10 Oct 2001 16:05:06 +0200
 Itamar Shtull-Trauring [EMAIL PROTECTED] wrote:

 2) Plugging in a different transports instead of TCP (e.g. SSL) is much
 easier in Twisted than medusa, as far as I can tell. In m2crypto's medusa
 ssl code very protocol needs its own subclass in order supports SSL. In
 Twisted that is done transparently - the protocol doesn't have to worry
 about the transport. Basically any protocol (excepting perhaps FTP) could
 run out of the box with SSL in Twisted, using the one SSL support module. Or
 Unix domain sockets for that matter :)
 
 3) Twisted provides a larger number of protocols out of the box (e.g. pure
 python LDAP client, AOL TOC, IRC, POP3, SMTP, telnet) than medusa. Hopefully
we will soon have an integrated DNS server as well, though I can't think
 how *that* would help Zope.

Just to throw out another idea, Amos has discussed with me in the past the idea of 
replacing medusa with Apache 2.0.  Compelling as many of Twisted's features may be, 
Apache 2.0 as far as i can tell supports many of them as well (except perhaps jython 
integration, which is a pipe dream anyway for Zope).  Apache has the upshot in that it 
is rock solid, tested by millions, trusted by even more, and no doubt one of the most 
actively developed peices of software there is.

For ZC the upshots of 1) not needing to maintain it, and 2) it being a excellent 
marketing tool outweight many technical benifits that twisted may have that Apache 
doesn't (I'd like to know what the differences are, however).  For example, does 
twisted do URL rewriting?  proxy?  process/thread job control?

Twisted does have the advantage of 1, but not 2.  Further, our faith in the continuing 
development of Apache is, de facto, more than that of twisted simply based on the age, 
number of users, and number of developers of each project.

I'm not dismissing the idea, I'm just pointing out an alternative to Itamar's 
alternative.  ;)

-Michel

___
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] thread locking and ZODB

2001-09-13 Thread Michel Pelletier

On Thu, 13 Sep 2001 09:40:43 +1000
 Terry Kerr [EMAIL PROTECTED] wrote:
 Chris,
 
 I notice in the ZODB2 article that it states that the conflict
 resolution method should return the state of the object after
 resolving
 the differences..  However, in the example the method only returns
 the
 portion of the state that was deamed to be in conflict.  Shouldn't it
 be
 returning the entire new state dictionary?

I believe it should, and that the article is in error, but really, I wouldn't go on 
that without hearing from someone like Jim or Shane.

-Michel

___
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 to send patches?

2001-09-10 Thread Michel Pelletier

On Mon, 10 Sep 2001 12:16:51 -0400
 Jim Washington [EMAIL PROTECTED] wrote:
 Hi, All
 
 Since the Collector is down, where do we send patches if we are not 
 cvs-authorized?  I just discovered a not-too-clever hack to make the 
 Find tab  recurse through methods of Z Classes, which the margin of
 this 
 e-mail is too small to contain.

Dude, don't jinx yourself.  I'm sure you don't want us to refer to this as Jim 
Washington's last patch. ;)

-Michel

___
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] question on ZCatalog

2001-07-03 Thread Michel Pelletier


Zope-dev isn't the apropriate mailing list for this kind of question.  You
should ask your question on the [EMAIL PROTECTED] mailing list.  This list is
for developers.

Have you read the Catalog documentation?

http://www.zope.org/Members/michel/ZB/SearchingZCatalog.dtml

-Michel

On Tue, 3 Jul 2001, Cherry Jeanette Ebue wrote:

 Yes, I have.
 
 -Original Message-
 From: Andreas Jung [EMAIL PROTECTED]
 To: Cherry Jeanette Ebue [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Tuesday, July 03, 2001 8:37 PM
 Subject: Re: [Zope-dev] question on ZCatalog
 
 
 Do you have created the corresponding indexes for the attributes ?
 Andreas
 - Original Message -
 From: Cherry Jeanette Ebue [EMAIL PROTECTED]
 To: Andreas Jung [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, July 03, 2001 8:40 AM
 Subject: Re: [Zope-dev] question on ZCatalog
 
 
  Hey Andreas,
 
  I have articles with the following attributes: author, search_meta,
 title
  and publication date
 
  All attributes are included in the meta data list. When I search my
 Catalog
  (of articles), only attributes of type string are returned in the search
  result. Publication date (of type date) and search_meta (of type text) do
  not get covered in the search.
 
  Thanks,
  Cherry
 
 
 
  -Original Message-
  From: Andreas Jung [EMAIL PROTECTED]
  To: Cherry Jeanette Ebue [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]
  Date: Tuesday, July 03, 2001 8:07 PM
  Subject: Re: [Zope-dev] question on ZCatalog
 
 
  Cheery, could you please be a bit more detailed for us to understand
  your problem ?
  
  Andreas
  - Original Message -
  From: Cherry Jeanette Ebue [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, July 03, 2001 8:04 AM
  Subject: [Zope-dev] question on ZCatalog
  
  
   question on ZCatalog...
  
   how come indexes of type date or text are not covered/searched when
  queried?
  
   i'd really appreciate some help :-)
  
   Cherry
  
  
  
  
  
  
   ___
   Zope-Dev maillist  -  [EMAIL PROTECTED]
   http://lists.zope.org/mailman/listinfo/zope-dev
   **  No cross posts or HTML encoding!  **
   (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )
  
 
 
 
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


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



Re: [Zope-dev] persistence

2001-06-28 Thread Michel Pelletier

On Thu, 28 Jun 2001, Mark McEahern wrote:

 I'm a Zope and Python newbie and I'm trying to utilize Persistence, but I've
 seen two different ways:
 
   import ZODB
   from Persistence import Persistent
 
 vs.
 
   from Globals import Persistent
 
 Are these different?  If so, which is better?  Please don't ask me to
 define better.  ;-)

If you're just using Zope, both are acceptable.  If you are just using
ZODB, use the first.

-Michel


___
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] Hey Chris, question for you

2001-06-26 Thread Michel Pelletier

On Tue, 26 Jun 2001, Casey Duncan wrote:

 Ok, I was able to get it to work by instantiating a IISet around
 _unindex.keys() and passing that to difference (Thanks!), however, I
 notice an interesting side effect. Let's say you have a TextIndex on
 title and you do the following query:

 title != 'foo*'

 Which to me means: all cataloged objects whose title do not match the
 substring 'foo*'

 However, this is not what you get exactly, instead you get:

 all cataloged objects that have a non-empty title that does not match
 the substring 'foo*'

 Because from what I am seeing, objects with empty (or no) titles are not
 included in the index *at all*. So the set of all objects does not
 include ones without titles. I could fix this by making all objects be
 instead All objects in the catalog (via catalog.data.keys()) instead
 of all objects in the index, but I wanted to see if anyone had
 additional thoughts about this.

Hmm the reason for the current behavior was optimization by saving space
not indexing empty values.  The problem with your latter aproach is that
all objects in the catalog may include object that don't have a title
attribute at all.

I'm not against indexing empty values though.

-Michel


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

2001-06-21 Thread Michel Pelletier


I've cc:ed zope-dev in case anyone else is interested.

On Thu, 21 Jun 2001, David Goodger wrote:

 The last time I downloaded and studied the CVS branch was in November 2000.
 At the time, the code wasn't very inviting. I just downloaded the CVS branch
 again, using the instructions in
 http://dev.zope.org/Members/jim/StructuredTextWiki/NGReleases, and visited
 http://dev.zope.org//Members/jim/StructuredTextWiki. The RecentChanges page
 and the StructuredTextNT/CurrentStatus page both list several additions
 which don't seem to be reflected in STNG.txt or the StructuredText.py module
 docstring. Is this code up to date? If not, I would appreciate a pointer to
 the latest code, or a source .tgz by email.

The version in Zope CVS (the HEAD, not any branches) is the most current
code.  The branch was dinscontinued when we folded it into the head, so
try checking out a full head branch and look there, you will probably
notice many changes.

 If you do have information on creating a language front-end parser for
 STXNG, please send it. And please add links to my projects to the
 appropriate Wiki pages if you have time.

(Karl: everytime I say DOM, I mean DOM-like).

Basicly, Zope's current classic front-end is defined in
StructuredText/ST.py.  In there, you will see a function called
StructuredText that turns indented, newline separated text into
StructuredTextParagraph DOM objects, that get inserted DOM tree-style into
a StructuredTextDocument DOM object.

I would suggest you start looking there, ie, turn your code into a simple,
homogeonous StructuredText paragraphs.  For example::

   foo = Title
  ...
  ...   One
  ...
  ...   Two *three*
  ...
  ... o four
  ...
  ... o **five**
  ...
  ... 

   Basic(foo)
  StructuredTextDocument([
  StructuredTextParagraph(Title, [
   StructuredTextParagraph(  One, [
   ])
   StructuredTextParagraph(  Two *three*, [
 StructuredTextParagraph(o four, [
 ])
 StructuredTextParagraph(o **five**, [
 ])
   ])
  ]),
  ])
  

The resultant object is a StructuredTextDocument DOM object with
StructuredTextParagraph DOM children.  After the very first step, you
can work with the content using the DOM interface::

   Basic(foo).getNodeName()
  'StructuredTextDocument'
  

Notice how the first pass *didn't* go through looking for markup,
*just* for structure.  We did this for simplicity and because our
structure could be factored out of our markup, I'm not sure if you can
do that, but I suspect you can define more complex rules to define
what a 'paragraph' element is.

The next step is to colorize the simple, homogeonous DOM into a more
complex Document DOM object::

   Document(Basic(foo))
  StructuredTextDocument([
  StructuredTextSection(StructuredTextSectionTitle(Title, [
  ]), [
   StructuredTextParagraph(  One, [
   ])
   StructuredTextSection(StructuredTextSectionTitle(['  Two ',
  StructuredTextEmphasis('three')], [
  ]), [
 StructuredTextBullet(four, [
 ])
 StructuredTextBullet(StructuredTextStrong('five'), [
 ])
   ])
  ]),
  ])
  

Now you have a DOM object that fully expresses your textual language.
Obviously, you could turn this right back into STX.

The Document() factory accepts a simple STX DOM tree created by the
Basic() factory.  This factory goes through, using the DOM API,
looking for our special markup, and then colorizing that markup by
adding new, more specialized DOM objects (like StructuredTextBullet
and StructuredTextEmphasis).

The final step is to feed the colorized DOM into an output generator.
This is a factory that accepts a DOM object and returns a string of
that object in a certain format.  As an example, STXNG comes with
HTML, MML (framemaker) and DocBook generators::

 HTML(Document(Basic(foo)))
'html\nhead\ntitleTitle/title\n/head\nbody\nh0Title/h0\np
One/p\nh1 Two
emthree/em/h1\n\nul\nlifour/li\nlistrongfive/strong/li\n\n/ul\n/body\n/html\n'


So what you would do is to create your own frontend that can turn
your reStructuredText into a simple DOM consisting solely of
'paragraphs', whatever that means to you.  In the case of STX,
indentation and newlines define paragraph structure.  In reSTX, you
may have different ways of marking up document structure.  I suspect
your parsing rules will be more complex, and that you've probably
already written that piece.

DocumentClass.py contain a class for each type of markup STX defines.
All of these classes subclass the StructuredTextParagraph DOM object.
These DOM objects will get created when the
DocumentClass.DocumentClass class encounters your markup as it parses
your Basic DOM.

The DocumentClass.DocumentClass class has doc_* methods that get
called on every paragraph node in your Basic DOM.  Each method has an
associated regular expression that is used to match occorances of your
markup.  Some of them, like doc_table, are very complex, but others
like doc_emphasize are pretty simple.  You would write one subclass of
StructuredTextParagraph and one of 

Re: [Zope-dev] ZPL and GPL licensing issues

2001-06-20 Thread Michel Pelletier

On Wed, 20 Jun 2001, Gregor Hoffleit wrote:

 Hmm, I think this discussion doesn't belong to zope-dev.

It's very informitive to me so far.  I have no problem with discussing it
here.

-Michel


___
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 Michel Pelletier


Should we make an alias for bw-compatability?

-Michel

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.

 Cheers,

 Evan @ digicool


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



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



[Zope-dev] New Release of Zope Developer's Guide

2001-06-15 Thread Michel Pelletier


I'm happy to announce a new release of the Zope Developer's Guide,
available in HTML format here:

http://www.zope.org/Documentation/ZDG/

The new guide contains many improvements and elaborations over the
previous HTML release, and has benefited from the review and contributions
from many community members including well-known object-orienteers Jim
Fulton, Guido van Rossum and Bruce Eckel.

This will be the last preview release of the Dev guide before we release
the first edition alongside the release of Zope 2.4.

As usual, any problems suggestions should be noted in the SourceForge
tracker for the dev guide:

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

Thanks!

-Michel


___
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] Structured Text Plus

2001-06-12 Thread Michel Pelletier

On Tue, 12 Jun 2001, Ian Clatworthy wrote:

 Andreas Jung wrote:
 
  - Original Message -
  From: Ian Clatworthy [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Sunday, June 10, 2001 9:52 PM
  Subject: [Zope-dev] Structured Text Plus
 
   I've put together the design for an extended version of
   Structured Text which I'd like some feedback on before
   I go too much further. At this stage, the design is
   explained via a series of user-level How-To's, e.g.
   Writing Documents Using Structured Text Plus.
 
  Could you please summarize the benefits compared to
  STXNG ?

 As I understand things from reading the STXNG Wiki stuff,
 it's largely an internal rewrite which adds 2 or 3 new
 features, namely images and tables.

This is only a small feature compared to what STXNG really adds to
structured text.  STXNG turns structured text into cross-format Document
Object Model (DOM) in two stages and then into a final format.  The first
stage turns it into a simple DOM that reflects the paragraph structure,
but not the markup (italics, bold, links, etc.).

The second stage uses the first stage DOM to create an even more elaborate
DOM based on markup or colorized text found in the first DOM's
paragraphs.

The second stage DOM can then be fed to a final outputter stage that
renders the DOM in any format you want, currently we support HTML,
DocBook, and MML (Framemaker or something like that) and it would be easy
to add any other XML format or PDF.  Here's an example that will work for
you:

 print text
Title

  o *one*

  o **two**

  o 'three'

#
# Create the basic DOM structure

 Basic(text)
StructuredTextDocument([
StructuredTextParagraph(Title, [
 StructuredTextParagraph(  o *one*, [
 ])
 StructuredTextParagraph(  o **two**, [
 ])
 StructuredTextParagraph(  o 'three', [
 ])
]),
])

#
# Create the Colorized DOM structure

 Document(Basic(text))
StructuredTextDocument([
StructuredTextSection(StructuredTextSectionTitle(Title, [
]), [
 StructuredTextBullet(StructuredTextEmphasis('one'), [
 ])
 StructuredTextBullet(StructuredTextStrong('two'), [
 ])
 StructuredTextBullet(StructuredTextLiteral('three'), [
 ])
]),
])

#
# Generate HTML from the DOM

 print HTML(Document(Basic(text)))
html
head
titleTitle/title
/head
body
h0Title/h0

ul
liemone/em/li
listrongtwo/strong/li
licodethree/code/li

/ul
/body
/html

#
# Generate DocBook from the DOM

 print DocBookChapter(Document(Basic(text)))
chapter
titleTitle/title
itemizedlist
listitemparaemphasisone/emphasis /para/listitem
listitemparaemphasistwo/emphasis/para/listitem
listitemparaliteralthree/literal/para/listitem
/itemizedlist
/chapter



You should really work from STXNG because we designed it to be extended,
just like you want to do.  You can subclass and customize the colorizer
in the second stage to recognize your own customized markup and do what
you will with it.  Amos and I did this to support images in the book.
You can also customize outputers as I explained.

  You are targeting also the single-source approach
  for documents with STPlus - what are the benefits
  compared to working solution like Docbook ?

 Upwards compatibility with STX, i.e. something more
 readable than XML.

Amen to that!

-Michel


___
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] Boost.Python

2001-06-04 Thread Michel Pelletier

On Mon, 4 Jun 2001, James Treleaven wrote:

 Hi,

 I know that Zope has its own C++ binding mechanism for Python scripts,

Eh?  Zope uses the standard Python C API, like any other python system
with C code.  We don't have our own mechanism, nor do we use C++.

 but
 are there any complications with respect to my using Boost.Python to bind
 any Zope Python scripts that I write to C++ code?

You've _really_ lost me, maybe someone else knows what you mean.  I don't
know what you mean by 'bind' (do you mean writing python extension modules
in C?), or what Boost.Python is, or what you are referring to as 'Zope
Python scripts' (do you mean the python modules that come with Zope?).

-Michel


___
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] Wildcards in TextIndex query. Do they work?

2001-05-29 Thread Michel Pelletier

On Tue, 29 May 2001, Erik Enge wrote:

 On Thu, 24 May 2001, Michel Pelletier wrote:
 
 the unsplitted, unl and unq are my debug flags, but you can see what
 happens: without parens the '*' has it's desired effect, with, it doesn't.
 
 Got a clue?  Is this my bug, or ZCatalog's?

Must be ZCatalog's.  I'm guessing the paren matching takes a different
code path that doesn't expand wildcards.

-Michel


___
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] bug in ZEO-1.0b3

2001-05-29 Thread Michel Pelletier

On Tue, 29 May 2001, Dyon Balding wrote:

 If the ZEO server goes down, the the client no longer tries to keep
 reconnecting.
 
 This appears to be something to do with the __closed attribute in
 zrpc.py.
 
 Is there a page to check the status of bugs in ZEO?
 When is the next version due out? and will it be a final 1.0 version?

Your bug, and these questions are probably best asked on the
[EMAIL PROTECTED] list.

-Michel


___
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] Wildcards in TextIndex query. Do they work?

2001-05-24 Thread Michel Pelletier

On Thu, 24 May 2001, Erik Enge wrote:

 This query works:
 
   wil?car*
 
 This doesn't:
 
   (wil?car* or something else) and (word1 and word2)

If the first works, then you are using a globbing vocabulary.  The second
one should work, but maybe there is a bug.  Or perhaps your search
criteria is so strict that you are getting no results.

 I can't see that the query-parsers in UnTextIndex.py transforms them
 differently, but I might be missing something obvious.

There's _nothing_ obvious in that particular chunk of code.

-Michel


___
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] Wildcards in TextIndex query. Do they work?

2001-05-24 Thread Michel Pelletier

On Thu, 24 May 2001, Erik Enge wrote:

 On Thu, 24 May 2001, Michel Pelletier wrote:
 
  If the first works, then you are using a globbing vocabulary.  The
  second one should work, but maybe there is a bug.  Or perhaps your
  search criteria is so strict that you are getting no results.
 
 Hm.  Something isn't right here.

I don't think you are using a globbing vocabulary.

 This:
   
eric
 
 got me 70 hits.
 
 This:
 
eri?
 
 got me 4 hits.

If you are not using a glob vocab, I suspect it stripped out the ? and is
hitting on 'eri'.  Do you have that word anywhere?

 That's a bit strange, if you ask me :)
 
 This:
 
(erik) and (enge)
 
 returned 1 hit
 
 This:
 
(erik) and (eng?)
 
 gave me none.

Which could make sense if you were not using a glob vocab.

 The first one looked like this after the parsers had nibbled on it:
 
   [['erik'], 'and', ['enge']]
 
 And the latter one:
 
   [['erik'], 'and', ['eng?']]

This one should look like [['erik'], 'and', ['enge', 'engs', 'engf',
...]] and match all the words that match the pattern eng?.  If this isn't
being expanded, then you are not using a globbing vocabulary.

Then again, where did you get these objects?  If you were looking at the
wrong point in the code, the wildcards may not have been expanded yet.

 
  [['erik', '...', '...', '...', 'enge']]

Where do you see this?

 Where should I look next to figure out what's going on?

Make sure you are using a globbing vocab.  Note that you can't change a
catalog's vocabulary once the catalog is made, so you have to make a new
catalog.

   I can't see that the query-parsers in UnTextIndex.py transforms them
   differently, but I might be missing something obvious.
  
  There's _nothing_ obvious in that particular chunk of code.
 
 Good, then it's just not me.  Is the overall design philosophy for
 ZCatalog/Catalog/SearchIndex documented anywhere?

The catalog has evolved over the past four years.  Most of the text index
query parser code was written by someone long gone from this company, and
certainly way before my time.  The catalog is, in fact, the evolution of a
completely different product called ZTables, now long dead in the annals
of Principia history. 

This person did not document their design, so the answer is no.  I had
some UML models once, but my modeling tool ate them.

  (By the way, from
 lib/python/SearchIndex/TextIndex.py, what is sws and cv3?)

Very old consulting projects, long dead.

-Michel


___
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] SearchIndex Splitter lowercase indexes?

2001-05-24 Thread Michel Pelletier

On Thu, 24 May 2001, Christian Robottom Reis wrote:

 Hi, I've been testing SearchIndex's Splitter here, and I'm finding the
 behaviour only a tiny bit strange: it converts the words it splits to
 lowercase. Is this intentional? 

Yes.

Example:
 
  import SearchIndex.Splitter
  import SearchIndex.Lexicon
  s = SearchIndex.Splitter.Splitter(Foo Bar Baz,
   SearchIndex.Lexicon.stop_word_dict)
  s[0]
 'foo'
  s.indexes('foo')
 [0]
 
 Why does this happen? 

This is a very common indexing strategy to save space and make searches
more relevant.  Otherwise 'Dog' and 'dog' would return two completely
different result sets.  

The splitter also removes single character words, splits words on
non-alphanumeric characters based on your locale (like -) and trims off
common english suffixes like 's' and 'ing' so that 'walk' and 'walking'
find the same words.  The splitter can also be passed a mapping of
synonyms, so you can tell the splitter that automobile ford and lisp
are all synonymous to the word car.

 It makes TextIndex's position() call behave
 unexpectedly until you do some tests with the Splitter itself!

position() is currently unimplemented, isn't it?  so does it
matter?  Also, I don't know what your doing with position() but anytime
you want to look up things in a text index, use the same splitter to munge
the content before querying the index, otherwise, you may end up not
finding what you're looking for.

The splitter should really be a modular component.  That's what
vocabularies were origninally for, to store language specific artifacts
like word lists and splitters.  For example, stripping the ing suffix
obviously only makes sense in English.  so if you want to change this
behavior, make your own vocabulary with its own custom splitter.

This is because each language has very different splitting requirements,
and even different meanings of the word word.  Imagine, for example,
splitting Japanese or one of the Chinese languages (based textualy on
Kanji).  

Identifying words in Kanji is a very hard problem.  In romance langauge,
it's easy, words are seperated by spaces, but in Kanji words are
diferentiated by the context of the surrounding characters, there are no
spaces.  Splitting Kanji text requres a pre-existing dictionary and some
interesting heuristic matching algorithms.  And that's only half of
Japanese itself, really, since there are two other alphabets (hiragana and
katagana) that *are* character-phonetic like romance langauges, and all
three alphabets are commonly mixed together in the same sentence!  Chinese
language may also have these phonetic alphabets.

In other words, it's not an easy problem!  There is going to be an
unimaginable culture clash when asian and other non-romance languages
catch up to the volume of romance language content on the web.

-Michel


___
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] Xron error!!!

2001-05-24 Thread Michel Pelletier

On Thu, 24 May 2001, Loren Stafford wrote:

 5. You can truncate the bloated tail end of a Data.fs file using standard
 system tools. I don't remember how right at the moment, but a search in the
 mail archives on trucate and data.fs might be fruitful. 

Use the unix command 'split'.  I immagine cygwin ports this simple program
to windows.

Of course, you can also do the truncation in a couple lines of python, but
I'll leave that as an exercise to the reader. ;)

-Michel


___
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] SearchIndex Splitter lowercase indexes?

2001-05-24 Thread Michel Pelletier

On Thu, 24 May 2001, Christian Robottom Reis wrote:

 On Thu, 24 May 2001, Michel Pelletier wrote:

  This is a very common indexing strategy to save space and make searches
  more relevant.  Otherwise 'Dog' and 'dog' would return two completely
  different result sets.

 Fine. However:

  s.indexes('Foo')
 []

 Is _this_ supposed to happen, too?

Yes.  The splitter was applied to the document before it was indexed so
both Foo and foo became foo and there is no Foo.  The index itself is
technicaly not case insensitive, it's case flattened, which makes the
query interface case insensitive.

 Ah, I guess to. It's the problem with
 using this outside of Zope. :-)

No, you just didn't apply the splitter before you queried the index.

results = []
for word in Splitter(search for these words or foo):
  results = results + s.indexes(word)

 Uhhh, no, it _is_ implemented. It just didn't work like I'd expect :-)

  index.positions(1,['crazy'])
 [2]
  index.positions(1,'crazy')
 []
  index.positions(1,['Crazy'])
 []

I see, yes it must be a sequence and you must also apply the splitter to
your input before querying an index.

 So it does look lowercase words up. Of course, this is an artifact of the
 following point you make:

  you want to look up things in a text index, use the same splitter to munge
  the content before querying the index, otherwise, you may end up not
  finding what you're looking for.

 This makes sense:

  s = Splitter(Crazy)
  index.positions(1,s)
 [2]

 Ahhm. Okay. Will update my documentation with this important point.

Ah I see you came to the answer yourself.  Yes this is an important point,
especially for other languages where the splitter *must* be applied to
extract the words from context, like Japanese.

  In other words, it's not an easy problem!  There is going to be an
  unimaginable culture clash when asian and other non-romance languages
  catch up to the volume of romance language content on the web.

 Fascinating points on i18n and l10n of the indexing mechanism. Makes me
 wonder how far the current implementation will go before having to be
 rewritten, and if the world will survive east-meets-the-west of computing
 text.

Digital Garage implemented a JVocabulary and have sucessfully cataloged
japanese text.  I wonder if htdig or php can do that grin.

 But I believe the Splitter could stay the same for western languages, from
 what I've seen of the code. Can't really see the ing-cutting stuff here.

Oh, well maybe it used to remove common suffixes and I took it out.  It's
called stemming, and it's a pretty common pattern.  But you'd be suprised
how many people run into english only quirks even in western languages
with Zope's splitter.

-Michel


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

2001-05-23 Thread Michel Pelletier

On Wed, 23 May 2001, Chris Withers wrote:

 Hi,
 
 Is it still fair game to use the data_record_normalized_score_ attibute of
 ZCatalog Brain objects?

Yes.

 If so, is it accurate and meaningful?

Only for queries involving text indexes, and even then it's not very
meaningful.  It takes the entire batch of search results, from the most
relevant (word occourance score) the the least relevent, and normalizes
all their scores between 0 and 100 (or 0 and 1, same difference).

 Finally, is there any way I can do the Google-esque thing of showing the snippet
 of the searched etxt with the words that were found highlighted?

Yes, You would have to fetch the object and then scan it for the search
terms.

-Michel


___
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] Simple Question

2001-05-23 Thread Michel Pelletier

On Wed, 23 May 2001, jawad haider wrote:



 I wanted to make a search form in which search criteria and search
 result will appear on the same page e.g.search criteria on the top and
 when the submit button is pressed the list of search results should be
 displayed in the bottom of the page.

 But when I try to accomplish this using the following code the search
 results are displayed on a separate page.

You want to page to 1) draw a form if there are no search criteria and 2)
call itself when the form is submitted.  Andreas already showed how you
can check for a form submission, and havving the page call itself is
simple:

form action=.

this form will submit to its own URL.  Your question is out of the scope
of this list, which is about Zope core and product development.  This is a
user question, and should be directed to the Zope list [EMAIL PROTECTED]

-Michel



___
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] manage_workspace = index_html

2001-05-14 Thread Michel Pelletier

On Mon, 14 May 2001, The Doctor What wrote:

 What's going on?  Is this a Mozilla problem? 

Yes.

 If so, why is lynx
 doing the same?

Because lynx is broken too.

 How should I go about trouble shooting it?

The problem is the client does not provide the right Basic authentication
credentials for the frame like it's supposed to.  Zope then assumes that
you are just an anonymous user, and shows you the only 'managment tab' you
have permission to see, 'View'.

If I recall, this have been broken an fixed in mozilla a few times
now.  Other browsers do this wrong too, like w3m.

-Michel


___
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] ZEO Clients, broken servers, and Z2.pid

2001-05-10 Thread Michel Pelletier

On Thu, 10 May 2001, Anthony Baxter wrote:

 As far as I can see, ZEO clients don't write a pid to Z2.pid until
 after they've successfully connected to a storage. Is there a reason
 for this?

Probably not.  It's nothing to do with ZEO, z2.py does an 'import Zope'
before it writes the z2.pid file.

-Michel


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



Re: [Zope-dev] Zope Server hanging :-(

2001-05-03 Thread Michel Pelletier

On Thu, 3 May 2001, Chris McDonough wrote:

 It's no problem, especially as Michel had insomnia last night and did
 it.  ;-)

My best stuff comes out when I can't sleep.

Those of you who are interested in looking at it, check out the
ever-growing Zope Developer's Guide (shame on you if you haven't read
it!).

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

-Michel


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



Re: [Zope-dev] Zope Server hanging :-(

2001-05-03 Thread Michel Pelletier

On Thu, 3 May 2001, Michel Pelletier wrote:

 On Thu, 3 May 2001, Chris McDonough wrote:
 
  It's no problem, especially as Michel had insomnia last night and did
  it.  ;-)
 
 My best stuff comes out when I can't sleep.
 
 Those of you who are interested in looking at it, check out the
 ever-growing Zope Developer's Guide (shame on you if you haven't read
 it!).

Ok, well maybe not shame considering you have to check it out of CVS. ;0

-Michel


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



Re: [Zope-dev] Zope Server hanging :-(

2001-05-02 Thread Michel Pelletier

On Wed, 2 May 2001, Chris McDonough wrote:

 The docs (available via the --help switch) go into some of this detail, but
 I agree that a narrative explaining how to approach it from a functional
 perspective would be a good thing.

This should go in the debuggin and testing chapter of the dev guide.
Wanna take a stab?

-Michel


___
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] reading the entire DB

2001-04-26 Thread Michel Pelletier

On Thu, 26 Apr 2001, nw_moriarty Last Name wrote:

 Jim
 
 Were you able to run the script I sent previously?  I have attached it
 again.  It demonstrates that the entire DB is read each time an item
 is read.

It does this because your script creates and destroys the database
connection every time it reads an object.  If you keep this connection
open, then it won't do that.  Whenever you open a database, the whole file
is read in order to rebuild the index cache, when you .close() the
connection, the whole thing goes out of scope and is destroyed.

-Michel


___
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] getPhysicalPath?

2001-03-16 Thread Michel Pelletier



On Fri, 16 Mar 2001, Brian Lloyd wrote:

  To me, aswell. Is this documented somewhere? ;-)

 It's not in the Acquisition.stx in the ExtensionClass docs -
 probably they were never updated when it was added. I think
 that aq_chain is most useful as a debugging aid rather than
 something one would use in an application (which is not to
 say that it shouldn't be documented). It would be a good idea
 to add this to the Collector as a documentation issue.

A better place would be the sourceforge issue tracker for the dev guide:

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

-Michel


___
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] FTP interface being worked on?

2001-03-12 Thread Michel Pelletier

On Mon, 12 Mar 2001, Fred Wilson Horch wrote:

  You may also find our documentation process interesting:
  
  http://www.zope.org/DocProjects/intro
 
 Yes, very interesting!
 
 But I'm sorry to see that the Developer's Guide is only in the planning
 stages.  Here is some info that should go into it (from our Zope notes
 at
 
http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/notes-zope.txt?rev=1.8content-type=text/x-cvsweb-markupcvsroot=ecoaccess):
 

This information should actually go in the administrator's guide:

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

-Michel


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



[Zope-dev] Re: [Zope] Search Features and Zope Directions Road Map

2001-02-27 Thread Michel Pelletier


Please do NOT cross post.

-Michel


On Mon, 26 Feb 2001, Ausum wrote:

 Zope is a great application server, the same as its soon to be released Content
 Management Framework, because of  its bet on Python, everybody say it.
 Nevertheless, after reading the Directions Roadmap from DC, I was surprised that
 a substantial improvement of the searching features of Zope, wasn't mentioned as
 a major concern.

 For a new Zope enthusiast like me, it is a kind of addiction to arrange and
 administer content while taking the learning curve. Almost everybody in this
 list with a non-programming background might've experimented this. But when I
 arrived to the search features of ZCatalog, I got mixed feelings. (Right now I'm
 stuck on this OR indexes searching :)  )

 The fact is that - according to my strong belief - everybody uses more Google to
 look for Zope Site's content than Zope's own Zcatalog's search engine. Moreover,
 everybody uses more Google to look for everything, bypassing windows, doors, and
 portals!. Why? Because it's terribly smart (not mentioning its 6,000 Linux
 boxes, by the way), and because there's no need to follow the highly-engineered
 information architecture of a web site, if there's a trustful shorcut to the
 relevant content!. So, if I'd have to mention one big feature improvement to
 Zope, I wouldn't doubt: "search engine".

 I just wanted to point on this subject. I know Zope isn't about spidering and
 retrieving, but it should have "Greater Search Capabilities" as a title, within
 that roadmap.  :)



 Ausum



 p.d.   Right now I'm quite interested at the technology of searching and finding
 non structured content, in order to compose structured documents. For example,
 the guys at Vignette (StoryServer) say that its customers don't need to keyword
 anything in order to have a "related content" section. After the writer finishes
 a story, (possibly while) a routine by Autonomy (www.autonomy.com) reads the
 document and finds out what the document is about, and so it triggers a search
 for related content within the site, without the need of intervention by the
 writer.  (For the curious, Autonomy has published a personal version of its
 software. It's called Kenjin (www.kenjin.com) ). On the other hand, Fast, from
 Norway, already have a nice multimedia search engine, from regular,
 non-structured, spidered web pages. Can we do that "structuring the
 unstructured" thing within Zope?


 ___
 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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Zope Development Roadmap Components

2001-02-27 Thread Michel Pelletier


On Tue, 27 Feb 2001, Jimmie Houchin wrote:

 While reading the Zope Development Roadmap about components I had a
 question.

 It says:
 """Components will be edited via the filesystem as .py files. Components
 will probably be checked into and out of Zope via a CVS like facility.
 Components can be tested locally without checking them into Zope."""

 What does this say about developing components with Py/Perl Scripts?
 It looks to be closer to the current Python Products.

Yes.  We have thought a bit about "composite components" and "persistent
modules" and stuff like that, but we only went so far into elaboration
when we realized that it required lots, and lots of thought and effort.

The current component effort is much simpler, a component is: an object
with an interface.  If this is a ZClass with Perl-based script methods,
then so be it, but we haven't thought far enough into what ZClasses really
are to start thinking about giving them interfaces.

Is this sort of what you're asking?

-Michel


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



[Zope-dev] Zope book now in public CVS

2001-02-23 Thread Michel Pelletier


Greetings!

The Zope book is now available in raw (structured text) format in a
sourceforge CVS repository.  We are also using SF's bug tracking and other
tools to allow you better report problems to us than just email.  If you'd
like to check the book out of CVS, follow the instructions on this page
under 'Anonymous CVS Access':

http://sourceforge.net/cvs/?group_id=21038

What does this do for you?  Well, first off, if you see problems in the
book and you'd like to fix them, you can submit a patch to us instead of
an email "describing" your suggested fix in prose.  This is much more
accurate for us to see the problem you point out.  Tracking patches also
gives us a nice mechanism for making sure we give patch-submitters
honorable mention in the book!

Also, some people may want to distribute the book (in accordance with the
OPL license, or course) in some format we don't support yet, like LaTeX or
Word (yes, PDF is coming, we're working on it!).  With "the source" you
are free to go about converting the content into whatever format you'd
like.

Lastly, although we try to keep the site as in-sync as possible with the
CVS, the latest and greatest bug changes to the book may be found in CVS,
where the web-site may lag a few days behind.

So check it out, and enjoy.

-Michel


___
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] Introducing ZopePrints.

2001-02-13 Thread Michel Pelletier



On 12 Feb 2001, Erik Enge wrote:

 The rationale behind this is that the community at large would benefit
 from this by having _real_life_ case studies so when their time has
 come to implement an application in Zope, they don't fall into the
 same traps and pitfalls we did.  Instead of benchmarks, the Zope
 community would use implementation documents to decide whether Zope is
 up for the job or not, that's what really helps.

We would love to see this description from you.  We inside DC have our own
problem solving development process that is large, complex, slow, but
often (IMO) accurate if done well.  It is based partly on the "Rational"
model developed by the Three Amigos:

http://www.everything2.com/index.pl?node=the%20three%20amigoslastnode_id=125995

partly on chaos theory, Jim's three laws of engineering (1. F=MA, 2. You
can't solve a problem unless you know the answer, 3. You can't push a
rope)  and on the abundance of Thai food.

We also have a "fishbowl" experiment community process, a "dogbowl"
content managment design process, a documentation process, and one
horse-choking travel policy.

I think it would be great to get examples of your problems in a case study
format, but also in a higher-level, pattern like description.  Your
description sounds like it is based on the problem and the goals, which is
really great.


 I'm quite sure that it will also work as a tool for finding gaps and
 holes in either Zope or its tools and Products.

Indeed.

 We would like to start a project going in the Fishbowl which aims at
 creating the right tools to document a project as described above.

The fishbowl is the perfect place to do this.  In a conversation with
other people including Brian who is the "keeper of the fishbowl" we
realized that documentation artifacts come out of the fishbowl almost as
much as the software.  In fact, that's one of the whole reasons for the
fishbowl, to come up with better software because we thought about it and
wrote down some words before we started hacking code.  Instant
documentation.

Good luck!

-Michel


___
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] Interfaces Wiki Security Stuff

2001-02-07 Thread Michel Pelletier

On Tue, 6 Feb 2001 23:01:32 -
 "Chris Withers" [EMAIL PROTECTED] wrote:
  security.  That
  wiki and lessons learned from it were used by us to
 create the Interface
  package that now comes with Zope.
 
 Is there anywhere I can find docs on that package?

Yes, in the fishbowl:

http://www.zope.org/Wikis/Interfaces/FrontPage

look at UserDocumentation.

-Michel

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

2001-02-03 Thread Michel Pelletier



On Sat, 3 Feb 2001, Morten W. Petersen wrote:

 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?

I took a stab at IMAP once...

http://www.zope.org/Members/michel/MyWiki/IMAPServer

I haven't touched it in a while, and I cannot say much about it, it was
over a year ago.

-Michel


 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 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] Interfaces Wiki Security Stuff

2001-01-30 Thread Michel Pelletier


On Tue, 30 Jan 2001, Chris Withers wrote:

 Hi,

 How active/relevant is the interfaces wiki at:
 http://www.zope.org/Members/michel/Projects/Interfaces

Not active, mostly relevant.

 I'm trying to figure out how RoleManagers, local roles, etc work and where the
 work of Zope Security is actually done.
 I've found ZopeSecurityPolicy.py and bits of stuff in Roles.py, and a few lines
 in BaseRequest.py, but the picture is still kinda flakey :-S

 It looks like there was quite a lot of discussion on the Wiki about all this,
 but I'm not sure how old it is and whether anything happened from it :-(

It's old.  The Interfaces Wiki was a first attempt at grasping the API of
Zope, not an easy task.  Most of the effort in that wiki went into the
online help system for "through the web" objects.

As a second goal, the wiki was also used to collaborativly develop new
interface in Zope, mostly in the areas of traversal and security.  That
wiki and lessons learned from it were used by us to create the Interface
package that now comes with Zope.

The next phase of the project is to actually document the interfaces of
Zope in Zope itself using the new interface framework.  This will be the
first step (and the hardest) toward a more component-oriented framework.
These issues have been one of my tasks for the past few weeks, and in the
next major version of Zope, you will probably see a good bit of internal
interface documentation for high level and low level Zope interfaces.

-Michel

 So, where should I be looking to find out how RoleManager, Local Roles  Proxy
 Role work from a Python product developers point of view (in Zope 2.3) and what
 changes are in the pipeline?

Security changes are usualy not driven through a pileline, think more like
a gun to your head. ;)

-Michel


___
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] PythonScripts documentation

2001-01-26 Thread Michel Pelletier



On Fri, 26 Jan 2001, Gerald Gutierrez wrote:


 Where is the latest documentation for PythonScripts located? The closest I
 found is

 http://www.zope.org/Members/4am/PythonMethod

 but it is dated and contains minimal information.

 I'm specifically interested in what I can do with them and what I cannot do
 with them.

What you can do with them from a practical standpoint is documented quite
a bit in the Zope Book:

http://www.zope.org/Members/michel/ZB/ScriptingZope.html

I'll be uploading a new version of the book with many corrections RSN.

What you cannot do with them from a dryer perspective can be found in the
online help system under API Documentation.  Please email
[EMAIL PROTECTED] if you feel there are any holes in either resource.

-Michel


___
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] Editors [OT]

2001-01-25 Thread Michel Pelletier

On Thu, 25 Jan 2001, Chris Withers wrote:

 My wishlist would be:
 
 - Runs nicely on NT4

XEmacs

 - Syntax highlighting for Python, C, XML, HTML (and, although this is dreamworld
 stuff, DTML ;-)

XEmacs

 - FTP or WebDAV editing built in as standard (or alternative solution, like
 cadaver making it work ;-)

XEmacs

 - Regular Expression search  replace

XEmacs

 - search  replace of multiple files

XEmacs

 and my dream list would be:
 
 - can run multiple copies of the editor at once

XEmacs (but who needs more than one emacs?)

 - class browser for python, with expand/collapse of code (like the editor for
 Python 2)

XEmacs (speedbar mode)

 Any ideas?

I had to, love makes you do strange things.

-Michel


___
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] Perl Scripting in Zope

2000-12-15 Thread Michel Pelletier



On Fri, 15 Dec 2000, Mike Kelland wrote:

 I've got about 3/4 of my application built in Zope (entirely in dtml
 I'm afraid to say) but I'm reaching a point where it's difficult to
 continue with only DTML (things like complicated database structures
 and validation of input fields) and since I don't quite know python
 yet (currently teaching myself) and I'm adept at Perl, I'd like to
 incorporate Perl Scripts into my app.  I got the
 pyperl-1.0.beta.tar.gz and zoperl-1.0.beta.tar.gz modules from
 ActiveState but I really have no idea if they're Win32 compatible (or
 only on Linux/Unix etc) and if they are, how to install them.  I'm
 reluctant now to switch to a standalone Perl solution now that I've
 invested so much time into the Zope one.

Perl Scripts are still being developed, but if you want to jump through a
hoop or two they are quite cool (or so I'm told, as I don't know enough
Perl to even write one).  When we documented them for the upcomming book,
I had to download my own python, and my own perl distributions and patch
them both.  Then I had to compile some magical stuff and diddle with my
paths.  Then they worked.  It's all documented fairly well in the readme,
and you might want to skim through the mailing list archives and read
everything by Gisle.

I can't tell you how hard it is on Windows, I did it on Linux.

As a posible interum sollution, you might want to check out Zope 2.3a1.
This release of Zope has Python Scripts.  These little babies are no
harder to use than DTML (many (like me) believe way easier) and end you up
with much better design.  Learning Python is a snap, I suggest running
through the Python tutorial on python.org (it's short and sweet) and
you'll be up and running in no time.

-Michel


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




Re: [Zope-dev] Gadfly and Zope 2.2.4

2000-12-11 Thread Michel Pelletier

On Sun, 10 Dec 2000, Josh Zeidner wrote:

 Hello,
 
   I tried to add a Gadfly Database connection to my Zope installation 
 without changing any of the parameters and got an error message saying: "The 
 parameter, connection, was omitted from the request." .  What, if anything, 
 am I doing wrong?

You're not selecting a data source.  This is one of the items in the list
box on the add form (the default setup comes with one data source called
'demo'.  To add your own data sources, see the Gadfly docs.

-Michel


  
 -josh zeidner
 Brooklyn Media Labs, LLC.
 
 _
 Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 
 


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




[Zope-dev] ANNOUNCE: Zope 2.3.0 alpha 1 Documentation Release

2000-12-11 Thread Michel Pelletier


On the heels of Brian's announcement, we are gurgling with joy to announce
a sychronized release of the Zope Book for the Zope 2.3 alpha release.

http://www.zope.org/Members/michel/ZB/

This release marks the first time the book and Zope are "in sync" enough
for you to be able to fully try out all the examples and understand all
the concepts.

This also marks the first time in long time that Zope has a (fairly)
complete, up-to-date manual!  Truely exciting times are these.  Remember
though, both the software *and* the manual are alpha, they both will have
bugs.  Please report any bugs, suggestions, or comments in the book to
[EMAIL PROTECTED]

Happy reading!

-Michel


___
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] Signed Zope Book Winners

2000-12-11 Thread Michel Pelletier


Last week we announced a content to win free, signed copies of the
book for finding errors in the book releated to calling a Script a
Method.  We have winners!  Thanks folks, there are real bugs my eyes
missed, and we've fixed them all.  As soon as the book hits our
local shelves, we'll get your signed copies in the mail.  Here are
the official winners!

  o "jimbo"

  o M. Adam Kendall

  o Jason Cunliffe

  o Lalo Martins

  o Jochen Knuth

  o Holger Hoffmann

  o "Bak@kedai"

  o Magnus Heino

We'll be contacting the winners by email.  If I sent you an email
saying you *did* win and you're not in this list, fwd: it back to me
and we'll get you a book, you may have slipped through the cracks
(my mail filtering isn't all that hot).  Please do *not* send it to
the zope list, cuz then my filters send it off to the big pile that I
don't read that often.

-Michel



___
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] ZPublisher and func(self,*args,**kw)

2000-12-09 Thread Michel Pelletier



On Sat, 9 Dec 2000, Andreas Jung wrote:

 Inside a product I tried to replace the following function
 
def myfunc(self,arg1='',arg2='',REQUEST=None):
 
  by
  
def myfunc(self,*args,**kw):
 
 to get a more generic interface. However in every case "args" and "kw" are
 empty when I output their contents inside the function. Bug or feature ?

Zope will only match up arguments from a request with your function
arguments when you are specific.  It won't just shove everything it can
into *args or **kw.

-Michel



___
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] New version of book uploaded

2000-12-08 Thread Michel Pelletier



On Fri, 8 Dec 2000, Bak@kedai wrote:

 On Friday 08 December 2000 09:07, Michel Pelletier wrote:
  Greetings,
 
  Read this carefully, you may end up with a free, signed copy of the Zope
  book.
 
 
 as ypu said, this whole chapter still uses python methods.  

Actually, the copy of the chapter in your browser cache still uses
Python Methods.  The copy on the website does not.  All of these you've
pointed out are old news...

Sorry!

-Michel



___
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] Failed upgrade to 2.2.4 - solutions?

2000-12-08 Thread Michel Pelletier



On Fri, 8 Dec 2000, Luke Tymowski wrote:

 Hello,
 
 I've just tried and failed to upgrade to 2.2.4 from 2.2.2.  A python 
 instance  starts up and slowly swallows the CPU,  ending with 99% of the 
 CPU. A second python instance starts and doesn't do anything naughty.
 
 If I issue a ./stop, the second python instance ends properly, but the 
 first continues to consume all CPU resources.
 
 I've tried recompiling it several times, reinstalling Python, but no go. 
 It did once start up properly, but as soon as I tried logging into Zope, 
 python took over the CPU.
 
 I'm using OpenBSD 2.8, python 1.5.2, x86, 196MB of RAM, GBs of free disk 
 space.
 
 I've been using Zope since 2.0 and have never had this much trouble 
 upgrading.  the only Zope product I'm using is SiteAccess (the same 
 setup as the old Zope.org before the cluster upgrade).
 
 Any ideas?

Try turning on the profiler.  Quothe the control panel:

  To enable profiling, restart the Zope process with the environment
  variable PROFILE_PUBLISHER defined. The value of this variable should be
  the full system path to a file that will be used to dump a profile report
  when the process restarts or exits.

And kill the process.  Maybe this will create a profile report that tells
you where it's spinning.

Are you sure your waiting long enough?  If you have a large Data.fs and you
just move it over to a new install, Zope needs to take some time to build
the initial database index file.

-Michel


___
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] Failed upgrade to 2.2.4 - solutions?

2000-12-08 Thread Michel Pelletier



On Fri, 8 Dec 2000, Luke Tymowski wrote:

 Hello
 
To enable profiling, restart the Zope process with the environment
variable PROFILE_PUBLISHER defined. The value of this variable should be
the full system path to a file that will be used to dump a profile report
when the process restarts or exits.
 
 PROFILE_PUBLISHER='/home/luke/sw/zopeProfile.txt'
 
 like so in my z2.py? it didn't do anything.

Nope, you need to set a process environment variable on your system, not
a python variable in your module. You do this before
staring Zope, you can do it in a start script (syntax depends on your
shell) you can do it from z2.py with os.eviron:

http://www.python.org/doc/current/lib/os-procinfo.html

Or you can do something like:

bash$: export PROFILE_PUBLISHER=/home/luke/sw/zopeProfile.txt
bash$: python z2.py -D

or something of the like...

  But I can get a python core dump!
 
 I tried just a basic install, without my Data.fs. Same result.
 I tried 2.2.2. Same result.
 
 Looks like an incompatibility with OpenBSD 2.8 (I was running 2.7 until 
 2 weeks ago.)
 
 Any ideas? C-compiler or Python incompatibility between what is on 
 OpenBSD 2.8 and Zope?

Don't know...

 
 OpenBSD 2.8 comes with Python 1.6. I removed all traces of Python and 
 reinstalled 1.52 from the source.

It's possible you have library missmatch.

-Michel


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




Re: [Zope-dev] Significance of the ZODB split?

2000-12-07 Thread Michel Pelletier

On Fri, 8 Dec 2000, Robin Becker wrote:

 Anyone know why AM Kuchling needs to split off a Sourceforge project
 based on ZODB?

I don't think it's a "split", but AMK is using ZODB internally at his
job, and externally with his own projects, so I can see him wanting to
have some control over the distribution that he uses.  

Other than that, there could be other reasons, we, for example, do not
provide a mechanism for community checkin privledges, Sourceforge
does.  I don't think we have a ZODB specific mailing list, sourceforge
offers this.

That being said, I'm pretty sure we've allways kept up with Andrew's
patches and suggestions, and we'd be happy to create a mailing list.

Andrew has also extended any developer at DC checkin privledges at the
sourceforge project; although I suspect we'll just continue to check
into our CVS and he'll "sync" with us that which he wants.  I am, in
particular, barely not lazy enough to check stuff into branches, much
less whole other repositories. ;)

 I really liked the ZEO examples, but where's this going?

It's just open source.  More power to him in my opinion.  He's
definatly taking Zope and ZEO to new levels and audiences.

-Michel


___
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] New version of book uploaded

2000-12-07 Thread Michel Pelletier

Greetings,

Read this carefully, you may end up with a free, signed copy of the Zope
book.

That's right, Amos and I have just gotten done adding all kinds of new
stuff to the book, and in particular we made quite a few changed from
"Python Method" to "Python Script".  This was a task more subtle than a
simple search and replace, many changes needed to be done.

Also, sometime really soon, we will be making a 2.3 alpha release.  This
will be the first release of Zope that will be "in sync" with the
book.  Lots of milestones to reach there.

So, instead of reading the book over again for the N to the Nth time
in preparation, we have decided to run a fun little contest. 

The *first* person to point out an incorrect usage of the term
"method" when it should be "script" will get a free copy of the Zope
book signed by Amos and myself.  If you are the second person to point
out the same error, sorry, you're out of luck, but *keep reading*
because you may find another!  For each unique "method" error found in the
book, someone will get a free signed copy!

And don't just stick to Chapter 8 (although that's probably the best
place to start!) because Python Meth...er Scripts are used all over
the book.

To keep everything fair, you must report your findings to the community
reviewer list at [EMAIL PROTECTED]  They will be the "judges", and
will decide who does and who does and does not get a book.  

Here are some sample right and wrong sentences to give you an idea, just
because a sentence contains the word "method", doesn't make it wrong:

  "DTML Methods are smelly."  (Right)

  "By using DTML, Python, Perl or other kinds of methods, you can
  script the web." (Wrong)

  "Python Methods rock!"  (Wrong)

  "You can call *fooBar* through the web like any other kind of
  method". (Wrong, should be "object", tricky! The judgest make the call
  on these kinds of errors)

  "The Python code in your External Method must be in the Foo module."
  (Right, External Methods still exist)

Get the idea?  

The O'Reilly community reviewers (the "judges") and employees of
Digital Creations are not elligible in this contest, sorry guys, you
already get free books. ;)

So without further a-do here's the URL.  Have fun!

http://www.zope.org/Members/michel/ZB/

-Michel



___
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] New version of book uploaded

2000-12-07 Thread Michel Pelletier



On Thu, 7 Dec 2000, jimbo wrote:

 
 I meant to paste this link in the last posting.  I had the wrong title.
 http://lists.zope.org/pipermail/zope/2000-December/036772.html
 
 
 And when do I get my book?

Slow down jimbo I haven't even eaten dinner yet!  We got yer submission.

 And can I get the likes of Guido, and Jim to sign the book also?

Nope, sorry.  Amos and I work many thousands of miles away from them.
Perhaps if you bring your copy to Python9, you can talk them into signing 
it.

-Michel

 Just making sure this thing is on.

It is.


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




Re: [Zope-dev] ZUnit - feedback convocation

2000-12-04 Thread Michel Pelletier

On Thu, 30 Nov 2000, Lalo Martins wrote:

 Hi all
 
 I'trying to write a document on ZUnit and Unit Testing in
 general, following Michel's and Amos' documentation process. I
 wrote an outline, and now I'm stuck :-) anyone with a few free
 moments is welcome to take a look and send me some words. Also,
 anyone very interested in the subject is welcome to volunteer
 for editorial help (read the Process to know what this means).
 
 Thank you.
 

I have some suggestions for the outline:

In the first section, remove "where does it come from" if the section
involves the history of unit testing.  I'd say the history lesson is out
of scope. ;)

I would add a section in the beginning "Why do you want to use it".  

What does "refactor mercilessly!" mean?

Next section...

"Importing ZUnit" requires a whole section?  I suggest axing it.

I would add an "example" section before moving into fitting it into
Zope...

What are "Fixtures"?  What is the "persistence problem"?  If it is a bug
that should be fixed in Zope then it probably shouldn't go in the
documentation, if it is something the reader shouldn't do, then it should
probably go into "interfacing with the Zope environment".  A wart
doesn't justify adding a new section just to add a sub-section to document
it. ;)

Here's a modified outline I tweaked with my above comments:



Unit testing Zope Products with ZUnit

  by Lalo Martins

  Unit Testing

What is Unit Testing

Why do you want to unit test

How should it be done

Refactor mercilessly!  (?)

  Writing Tests
  
The TestCase class

An Example TestCase

Interfacing with the Zope environment

Fixtures (?)

  The persistence problem - leaving traces behind (?)

Grouping tests in TestSuites

Wrapping it all up in a creator function
  
  Running the tests
  
The TestRunner object

TestResults objects

Leaving objects behind for debugging



___
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] ZUnit - feedback convocation

2000-12-04 Thread Michel Pelletier

On Mon, 4 Dec 2000, Lalo Martins wrote:

  In the first section, remove "where does it come from" if the section
  involves the history of unit testing.  I'd say the history lesson is out
  of scope. ;)
  
  I would add a section in the beginning "Why do you want to use it".  
 
 The first section is the advocacy section; it will begin with
 "if you already do unit tests, you may want to skip this
 section". I'm not sure if the history lesson is out of scope,
 but "Why do you want to use it" is probably better.

Hmm... actually in that case you may want to axe both "why" and the history.

  What does "refactor mercilessly!" mean?
 
 I'll explain that one of the benefits of unit testing
 extensively is that you can modify your code without fear
 (you'll know when it breaks). This section is more advocacy
 than technical.

Ah, ok I like it.  I wonder if "refactor" is the right word; it's very
specific and it sounds like any kind of changing can be done.

  Next section...
  
  "Importing ZUnit" requires a whole section?  I suggest axing it.
 
 Hmm. Yes.
 
  I would add an "example" section before moving into fitting it into
  Zope...
 
 No, you can't do a lot without interfacing with Zope. I'd add
 an example *after* interfacing with Zope. Or both, perhaps.
 Maybe one example in the end of each subsection, so we don't
 need any subsection titled "example".

Oh, I was thinking of just a simple non-zope unit test to get the
flavor, but now that I think about it that's out of scope.  Yes, the
example after would be better.

  What are "Fixtures"?
 
 A method where you make many tests in a single TestCase class.
 You setup a situation (the "fixture") in a method named
 "setup", then you do the tests, then you clean up in a method
 named "teardown". In the HiperDom tests, for example, I use a
 Fixture to do most of the tests, because I initialize the
 Template object in setup.

Ah yes, I just went and RTFM.

  What is the "persistence problem"?  If it is a bug
  that should be fixed in Zope then it probably shouldn't go in the
  documentation, if it is something the reader shouldn't do, then it should
  probably go into "interfacing with the Zope environment".  A wart
  doesn't justify adding a new section just to add a sub-section to document
  it. ;)
 
 I don't consider this a bug in either Zope or ZUnit, it's just
 an "issue".

snip

 I allocated a subsection for this because just explaining the
 problem is already somewhat convoluted, as you see above ;-) in
 a printed book, I'd make it a sidebar or something, but...

Hmm.  I guess my concern was because it was the only subsection of
'Fixtures'.  Do fixtures need a more topical breakdown or are they
simple enough to sum up in one section?  Maybe we can think of some
'fixture use cases'.

-Michel


___
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] Patch to avoid hypenation variables and more

2000-12-04 Thread Michel Pelletier

On Mon, 4 Dec 2000, Tino Wildenhain wrote:

 Hi there,
 
 finally I want to release my patch for the in-tag. I hope
 it finds its way into the source-tree.
 I was sick writing such ugly constructs as _[_['sequence-item']]
 and so on, so I patched DT_In.py and DT_InSV.py 
 (in lib/python/DocumentTemplate) to use sequence_item as well.
 All hypenation variables have now a second representation with
 underscores instead of hypenation. I hope, some time we can
 drop these hypenation variables.

Or drop DTML entirely.
 
 The second problem is if you put one in-tag into another.
 You have to use dtml-let oder REQUEST.set() with variables
 of the outher in-tag to be able to reference them in the inner
 loop. The code becomes very ugly this way. So my idea was to
 give the in-tag an optional argument, called "prefix" to 
 prefix all the sequence-variables with a custom identifier.
 So you can write:
 
 dtml-in some_sequence prefix="outer_"
dtml-in some_other_sequence
  dtml-var outer_sequence_item:dtml-var sequence_item
/dtml-in the inner sequence
 /dtml-in the outer sequence
 
 What do you think about this? 

It's cool.  Your patches are big and therefore, naturally, are a bit
worrisome to us in terms of checking them into the core.  Do you have a
set of test DTML scripts that verify your patch?  Say, a set of scripts
that verifies backwards compatibity, and a set of scripts that verifies
the new functionality?  I would suggest even investigating "ZUnit" and
creating DTML unit tests.  Then we would *really* love you.  ;)

-Michel



___
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] Public CVS Zope won't compile (fwd)

2000-12-03 Thread Michel Pelletier



On Sun, 3 Dec 2000, Chris Gray wrote:

 Did a fresh checkout but "python w_pcgi.py" chokes at:
 
 Writing the pcgi resource file (ie cgi script),
 /home/cpgray/zope_cvs_run/Zope2/Zope.cgi
 chmod 0755 /home/cpgray/zope_cvs_run/Zope2/Zope.cgi
 Traceback (innermost last):
   File "w_pcgi.py", line 111, in ?
 if __name__=='__main__': main(sys.argv[0])
   File "w_pcgi.py", line 109, in main
 import wo_pcgi; wo_pcgi.main(me)
   File "/home/cpgray/zope_cvs_run/Zope2/wo_pcgi.py", line 98
 import comcontent.main(home, user, group)
   ^
 SyntaxError: invalid syntax
 
 Cheers and Beers,
 Chris

Works dandy here, neither w_pcgi.py or wo_pcgi.py have been modified in
over a year.  I agree that the code your traceback reports on line 98 is a
syntax error, but it doesn't match what is on line 98 in the CVS.

-Michel



___
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] IP address and US city name

2000-12-02 Thread Michel Pelletier

Hung Jung Lu wrote:
 
 From: Bill Anderson [EMAIL PROTECTED]
 Hung Jung Lu wrote:
  
   Hi,
  
   I know that IP addresses in the USA follow a strict pattern of
 geographical
   locations. (Most other countries don't do that.) Does anyone know where
 I
   can get a copy of the table of IP addresses vs. city names?
 
 Whomever told you this was wrong.
 
 No Bill. You are the one that is wrong. :)

Actually Hung, on this one he is right.  I owned and operated an
internet service provider for four years.  There is no 'strict' policy
of who gets what address block.  Random companies in random cities at
random times ask for, and recieve, random chunks of classless address
space based on their need.  It is true that this chunk of address space
is then _usually_ assigned to only one geographic location, but there is
no strict policy and no one keeps track of it in a  big-brother database
'table' that maps this information for you.  

The companies themselves may keep track of which addresses go where, but
they are not required to report this to anyone or to update some global
directory when they change their network setup or move stuff around. 
Also, at the highest level are large organizations, phone companies,
universities, government organizations, etc.  In the case of companies,
these organizations usually get a huge chunk of address space and them
sell it off to other people, like, for example, GTE (a phone company)
sells its addresses to Genuity (an ISP) which sells its addresses to
Nap.net (an ISP) which sells its addresses to Collective Intelligence
(the ISP I used to own) which sells its addresses to Dialogue, Inc. (an
ISP owned by my buddy Adam).  Adam was not require to report to me what
or where or who he sold his addresses to, similarly I was not required
to report that informtaion to Nap.net, who, in turn I presume, is not
required to report the information on upward and so on.  At the very
highest level, the only information know is "GTE owns 200.x.x.x to
220.x.x.x".  GTE is, geographicaly, the biggest phone company in the US,
serving almost all of the rural mid-west.

That said, there is a company that has intrusivly scanned the whole
internet (globally, not just the US) and claims to have, using
deduction, figured out where all the addresses are.  I'm assuming their
service is very expensive, not 100% accurate (because neworks move and
get rewired) and it is targeted towards advertisers:

http://slashdot.org/yro/00/11/06/0521235.shtml

-Michel

___
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] Installation and Startup

2000-12-02 Thread Michel Pelletier

Norm LaDuke wrote:
 
 I have installed Zope on a 300Mhz K6 machine with 92 Megs of RAM running Windows
 98. It seemed to install ok except that it didn't ask if I wanted to run as a
 service (as the documentation said it would).

Could you point out to me, precisely, where the documentation says this
so I can fix it?

-Michel

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




Re: [Zope-dev] ZUnit - feedback convocation

2000-11-30 Thread Michel Pelletier

Lalo Martins wrote:
 
 Hi all
 
 I'trying to write a document on ZUnit and Unit Testing in
 general, following Michel's and Amos' documentation process. I
 wrote an outline, and now I'm stuck :-) anyone with a few free
 moments is welcome to take a look and send me some words. Also,
 anyone very interested in the subject is welcome to volunteer
 for editorial help (read the Process to know what this means).

Where would we find this outline?
 
 Thank you.
 
 (BTW, if you can't understand what an "outline" is, read the
 process too. Oh what the heck. If you haven't read it, then
 read it, it's very cool reading anyway.)

Thanks!

-Michel

___
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] Meta-data clarification and Interface interfaces

2000-11-29 Thread Michel Pelletier


In my proposal:

http://www.zope.org/Wikis/Interfaces/ExtensibleMetaData

I mention interface object meta-data like pre/post conditions.  This
spurned a lot of interesting conversation, and I wanted to clarify some
bits that I picked up from the thread.

The proposal is not in any way trying to define what types of meta-data
are interesting, this is, rightly, application dependent (for example,
Zope would find security assertions interesting, other applications may
not).  The proposal is just proposing a mechanism for associating any
kind of meta-data with an interface object.

Dont get me wrong, the information on pre and post conditions was really
interesting, especially Tim's description of Eiffel's particularly
strong methedology that made me glad I don't work for the government.

In the interest of clarifying what these interface objects are, I have
created an Interface interface description:

http://www.zope.org/Wikis/Interfaces/InterfaceInterface

This describes interfaces, attributes and method objects and how they
are used.  I can forsee creating interface objects for these interface
objects.

The ones marked **Proposed** are the ones I am most interested in
getting feedback on.

Thanks!

-Michel

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




Re: [Zope-dev] Zope.org done broke

2000-11-29 Thread Michel Pelletier


Oops.  Sorry for the spam.  Nothing to see here folks, move along.

-Michel

___
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] RFC: Python/Zope Interfaces: ZCatalog

2000-11-28 Thread Michel Pelletier

Chris Withers wrote:
 
 Ken Manheimer wrote:
 
  I'm not expert on eiffel or even interfaces, but my understanding having
  interface "specification very near to the implementation" is misleading,
  at best.  The key thing is that there may be many implementations, all of
  which should be written to the same implementation - so you do not want
 
 Should that be 'same interface'?
 
  the interface specification tied to any one of them.
 
 This is a very good point!
 
 I'd be really interested in making something that supported the Catalog
 'interface' but actually used the new MySQL full-text searching stuff to
 do the indexing/searching.
 
 However, until Catalog has a defined _interface_, I'm not even going to
 think about starting :-S
 
 Anyone know when that's likely to happen?

A couple of years ago. (hehe - sorry, had to).  The Z Search Interface
is well defined (not well documented) and the Catalog is not the only
object that implements it, so do ZSQL Methods and Z Network Adapters
(which you've probably never heard of, they're buried in the CVS
somewhere...).  The 'Z Search Inteface' object is one tool in particular
that uses it, perhaps you can in imply the interface from that since it
is not documented.

-Michel

___
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] objectValues performance

2000-11-28 Thread Michel Pelletier

Brett Carter wrote:
 
 Ok, I'll bite.  Why doesn't the standard folder scale?  Seems like a
 design flaw to me - why doesn't the default folder use catalogs or BTrees?
 -Brett

Because massive scale is not a requirment of folders, they are meant to
organize content for humans, not to be large-collection containers.  A
folder with 5000 elements is not very useful to a human.

On a similar note, create 5000 files in a linux directory on a ext2
(standard) filesystem and then type 'ls'.  You'll notice they don't
scale very well either, which is why there are filesystems like
ReiserFS.

-Michel
 
  "Casey" == Casey Duncan [EMAIL PROTECTED] writes:
 
 Casey Brett Carter wrote:
  I have a folder with greater than 5000 ZClass instances in it.  It
  takes  5mins to do an objectValues for every object in the folder -
  is there a higher perfomance call I could make?
  -Brett
 
 Casey Standard folder performance degrades pretty quickly once you get
 Casey a lot of objects in it. There are two solutions to this:
 
 Casey Subdivide your objects into multiple folders.
 Casey Use a BTreeFolder which should be much faster.
 
 Casey You can download the BTreeFolder product
 Casey here: http://www.zope.org/Members/hathawsh/BTreeFolder/
 
 Casey hth,
 Casey Casey Duncan
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

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




[Zope-dev] Interface Meta Data proposal

2000-11-28 Thread Michel Pelletier


I've added a sub-proposal to the Interface proposal for describing
additional meta-data with Interface objects:

http://www.zope.org/Wikis/Interfaces/ExtesableMetaData

Please comment about this interesting possibility.

-Michel

___
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: [Geeks] Interface Meta Data proposal

2000-11-28 Thread Michel Pelletier

Chris McDonough wrote:
 
 Is security really a part of an object's interface? 

Maybe.  Are examples?  Also maybe.  It's documentation, so specific
systems that use interfaces may want to be able to extend the kinds of
information they can associate with interface elements.

 I thought this was more
 of an implementation thing.

These are good questions, I think these also have a great effect on the
Zope 3 story.  BTW, the whole idea of extensible meta-data on an
interface element came from reading the Zope 3 story so far, and seeing
the examples that include security assertions in an interface.  Amos and
I discussed it a bit and that's where the proposal came from.

-Michel

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




Re: [Zope] ZCatalog and LoginManager - be aware.

2000-11-28 Thread Michel Pelletier

Oliver Bleutgen wrote:
 
 Hi,
 
 I just wanted to mention a IMO bad pitfall when using ZCatalog, for
 the sake of sparing others some time.
 
 I'm running Zope 2.2.2 with LoginManager with SQL in a subfolder and was getting
 the following error  when trying to find dtml-documents into ZCatalog:
 
 Error Type: AttributeError
 Error Value: commit_sub
 
 Traceback (innermost last):
   File 
/home/local-extranet/web/zope3/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py, line 
222, in publish_module
   File 
/home/local-extranet/web/zope3/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py, line 
187, in publish
   File /home/local-extranet/web/zope3/Zope-2.2.2-src/lib/python/Zope/__init__.py, 
line 221, in zpublisher_exception_hook
 (Object: Traversable)
   File 
/home/local-extranet/web/zope3/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py, line 
175, in publish
   File /home/local-extranet/web/zope3/Zope-2.2.2-src/lib/python/Zope/__init__.py, 
line 235, in commit
   File /home/local-extranet/web/zope3/Zope-2.2.2-src/lib/python/ZODB/Transaction.py, 
line 261, in commit
 AttributeError: (see above)
 
 All other object-types (incuding dtml-methods) seem to work. I have put no
 restrictions on which files I want found, but restricting something to
 reduce the number of found objects helps.
 
 I fiddled around somewhat and discovered that disabling
 subtransactions in ZCatalog does help (required for using
 ZSQL Methods and ZCatalog in the same transaction).

Yeah, that sux.  I think this is a known limitation.  I'm not sure.
 
 Now I use SQL-based LoginManager, but why on earth did it only
 fail on DTML-Documents? Is it because I have much more of them so
 only then ZCatalog's subtransactions come into play?

Probably because sub transactions are only commited after a certain
number of words or values are indexed, and your DTML documents were the
only things that held words.

-Michel

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




Re: [Zope-dev] RFC: Python/Zope Interfaces

2000-11-27 Thread Michel Pelletier

Dieter Maurer wrote:
 
 Michel Pelletier writes:
   Also, defining the interface seperately keep the two things apart,
   impementation and interface, and doesn't allow you to sneak in a new
   method unless you also sneak it into the interface, thus making a
   stronger "contract" with the user.
 I am a bit astonished by this statement:
 
   I know the "design by contract" concept from Bertrand Meyer,
   the Eiffel developper.
 
   In Eiffel, essential parts of the contract, among others
   method prototype, pre- and post-conditions as well as invariants
   are build directly into the language.
   A documentation tool extracts these parts
   from the source to generate the interface, for people
   that are only interested in how to use the class/method.
 
   Programms can be executed in a way, that the various
   (executable) contract parts can be checked at runtime.
   *THIS* provides for quite a strong contract.
 
 I cannot see, why the separation of interface and implementation
 should make the contract stronger. I do see, however, that it
 makes it more likely to be broken by the implementation.

The "contract" is a policy.  The mechanisms of interfaces should not
require that the policy be "strong" or "weak".  This is up to the
contractor.  I'm not sure if you are making these statement because you
disagree with the current proposal or because you disagree with what I
said above.  What I said above was just a scenario, not necessarily any
position I advocate.

The current python interface proposal makes no statement on the strength
of a contract.  It sounds like you want your contracts to be strong,
fine, but Python has no explict compile-time or run-time interface
enforcement.  The proposal in question is just trying to define how
interfaces are defined, created, implemented, and used.  Strong
contractual enforcement is a minor, policy-specific decision.
 
 It is a very good thing to have the specification very near
 to the implementation -- as a permanent guide to the
 implementor. It is even better, when big parts of the
 specification becomes part of the executable code
 (as is the case for Eiffel's pre- and post-conditions).

Maybe.  I disagree in this case: this proposal states that interfaces
are discoverable documentation, not language or policy enforcement.  The
less they can be tied to specific policies the more flexible they can
be.  Keep in mind, if you want run-time interface enforcement, you can
*allways* add it with mxProxy or some other mechanism.  If you *don't*
want run-time interface enforcement and we made it a requirement, you'd
be stuck.  You can allways add, but you can rarely take away.
 
-Michel

___
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] Lots more in the interfaces Wiki

2000-11-27 Thread Michel Pelletier

Hello,

I have added a lot more content to the interfaces wiki at:

http://www.zope.org/Wikis/Interfaces/FrontPage

(note, this is not the old interfaces wiki, which is link to from here).

This wiki is the realization of last weeks interfaces proposal:

http://www.zope.org/Wikis/Interfaces/OriginalProposal

So far, I have gone pretty far into defining the first goal of the
project "what is an interface".  For those of you that are interested in
looking at the prototype implementation, a new version can be downloaded
from:

http://www.zope.org/Members/michel/Products/Interfaces/

Some user and higher-fiber documentation can be found in the wiki. 
Please check out the wiki and let me know what you think about
interfaces.  These are important components that you will see a lot of
in the future, so we want your input!

-Michel

___
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] newbie question: Redirect from Python?

2000-11-27 Thread Michel Pelletier

Paul Winkler wrote:
 
 seb bacon wrote:
 
  * Paul Winkler [EMAIL PROTECTED] [001127 19:54]:
   I want the user to be sent to a particular URL after calling the
   product's manage_add method. How can I do that?
   The URL I want is REQUEST['URL3'].
  
   I've tried RESPONSE.redirect(REQUEST['URL3']) but that's not it - the
   RESPONSE doesn't seem to exist here.
 
  sounds alright to me.  are you calling it in quotes, e.g. dtml-var
  "RESPONSE.redirect(REQUEST['URL3'])" ?
 
  you shouldn't have to use the REQUEST to look up the variable, either:
  dtml-var "RESPONSE.redirect(URL3)"
 
 Thanks for the reply.
 OK, I didn't phrase the question correctly.
 
 I think it boils down to this:
 If I have a string that represents a URL, can I define a method of my
 product (in python, not in DTML) that redirects the browser to that
 URL?
 
 More details:
 
 My product code is based on Boring (like most newbies I guess).
 But manage_addBoring() does not do quite what I want. It returns
 self.manage_main(self, REQUEST), so they end up at a long and ugly URL
 that isn't where I want them to be anyway.
 
 Example:
  the user is at:
 
 http://localhost.localdomain:8080/Members/bobby
 
 Bobby then clicks on a button I've provided that says "Add Test
 Product". That sends him to the add form I've created. When Bobby
 submits the request from this form, the product is added and he's sent
 to
 
 
http://localhost.localdomain:8080/Members/bobby/manage_addProduct/MyProduct/manage_main
 
 ...because manage_addMyProduct returns self.manage_main
 So I understand what's happening, but it's not what I want.
 I don't want to send him there, I want to send him back to
 
 http://localhost.localdomain:8080/Members/bobby
 
 So how can I do that from within the manage_addMyProduct method
 definition?
 The method gets a REQUEST argument, and I know that REQUEST['URL3'] is
 what I want because if I return that string, it prints the URL I want.
 
 I could do it by returning an HTML page with a redirect in the head
 but that seems like a horribly ugly solution.
 
 Looking through various Zope docs, I thought RESPONSE.redirect might
 work, but  RESPONSE is not mentioned anywhere in Boring.py. Boring
 only uses REQUEST.

So pass it RESPONSE:

def manage_addMyProduct(self, blah, blah, REQUEST=None, RESPONSE=None):
  ...

The publisher will automaticaly pass you RESPONSE if you ask for it as a
method argument.  Now use RESPONSE.redirect.

-Michel

___
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] DC request re: Objection to Python Script Name

2000-11-24 Thread Michel Pelletier

Ron Bickers wrote:
 
 On Thu, 23 Nov 2000, Chris Withers wrote:
 
  To Hamish, the other Chris, and anyone else who's going to jump in on
  this.
 
  To be quite blunt, this has now been _decided_ as I understand it. So
  it's pointless to keep arguing and suggesting new and different names.
  We now _have_ a president and it's name is 'Python Script' ;-)
 
 With all due respect to everyone, this should not be considered a closed
 issue.

It is.  This is the kind of thing where it is impossible to make 100% of
the participants happy, we regret that not everyone is going to go for
it, but we *must* move forward.  This issue is holding up Python
Scripts, which is holding up the book, which is intimately tied to Zope
2.3, all of which is intimiately tied to my paycheck.  My paycheck
doesn't really have anything to do with it but I just thought I'd
mention it. ;)

  My understanding is that there would be a vote for a name.

We could not afford any further delay, and the last poll was a
disaster.  The author of Python Scripts (the majority of which were
written before he worked at DC) rightly asserted his position and picked
a name.  I'm sure it wasn't easy for him, and there was lots of internal
conflict; many in the company not liking 'Script' for many of the same
reasons you do.

 Skipping that in the name of getting things moving after it was offered by
 Digital Creations seems to go against the open source nature of the
 product. 

That is tying a strong semantic relation between "open source" and
"democratic".  In my mind, the open source nature is that anyone can
examine, author and contribute code to a project for peer review and
inclusion.  Evan did just that, he wrote most of what used to be called
Python Methods before he worked at DC and contributed it freely under
the open source mantra.  I don't think voting has much to do with open
source, it has worked for us (with the documentation poll) and failed
for us (with what used to be called Python Methods) but we'll probably
try it again.

 Not to mention that the name chosen does nothing to distinguish
 it from an everyday Python "script" outside of Zope, which is what sparked
 the name change to begin with.  "It's not really a Python method, so let's
 change the name."  Well, it's not just a "Python Script" either.  It's
 Zopified.

Just to clarify, in the Python language, there is no such thing as a
"script".  What you are thinking of as a "script" is really some hunk of
data (probably a file) containing python code that contains either some
platform specific hook to invoke the interpreter, or that you pass to
the interpreter on the platform specific "command line".  Neither of
these things have anything to do with the language called Python.  Once
inside the interpreter, you are officially working with "modules". 
"Modules" and "methods" are real, defined, un-ambiguous Python objects
defined in the Language Reference
(http://www.python.org/doc/current/ref/ref.html).  Obviously, naming a
Zope object "module" or "method" would be a bad idea, and therein lies
the problem.  

"Script" is just un-bound, non-python specific, vague lingo that
everybody uses to describe a chunk of code in just about any language,
on any platform.  In this case, the platform is Zope, the chunk of code
is written in Python, and the "command line" is your web browser.

I can sympathize with your feelings, but one of the reasons I don't like
"Method" is because it's is OO specific; it is a very technical term. 
"ZMethod" is no better, even if it doesn't have the problem of clashing
names with a python object (and barely not clashing at that!).  We want
to make using Zope easier.  For the target audience we want to approach,
if 1000 people pull down the add list and see "Python ZMethod" many more
of them are going to scratch their heads about what the hell a ZMethod
is than if they see "Python Script".  "Oh, a python script?  Cool!  I've
written some CGI scripts!  Now I can go and read chapter six of the book
'Scripting Zope' and find out how to 'script the web'!"

-Michel

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




Re: [Zope] Objection to Python Script Name

2000-11-24 Thread Michel Pelletier

Jason Cunliffe wrote:
 
 2. Fixes the OReilly book in some sensible manner - add highly legible note
 on Page 1, update the index in useful manner to catch the differences.

Oh I'll be doing that one, no worries there.
 
 3. Will explain to me 100% clearly what difference there is now between a
 regular Python script and a 'Python Script' in Zope?

There is no such thing as a "script" in the Python language (see the
index of the "language reference" on the python site, you will find
"method" and "module" but not "script").  "Script" is just a word that
is informally and commonly used to refer to a chunk of code written in
some language on some platform that is invoked by some action, possibly
from a "command line" or by double clicking on an icon.  In the case of
a Zope Python Script, the code is written in python, the platform is
Zope, and the "command line" is your web browser.

-Michel

___
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] Newbie Question Fixed but continuing.

2000-11-24 Thread Michel Pelletier

Dany Rioux wrote:
 
 Thanks Philipp and Jim,
 
 It worked! But... (there's always a but! :) I thought I was clever
 when I thought about naming my news files news999, news998 etc,
 thinking it would parse the directory and print the news sorted by
 their names. So news998 would be printed before news999 etc. It
 doesn't.
 
 deleted questions because it's fixed :) /deleted
 
 Now this too is fixed. I just discovered the "sort=" thingie.
 
 One thing would sure be helpful, a Guide explaining all the subtags in
 a tag. Like what can be used in a dtml-var or dtml-in and params
 for each subtag. 

http://www.zope.org/Members/michel/ZB/AppendixA.html

This DTML reference is also included in the Online Help System with Zope
2.4b1 and beyond.

-Michel

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




Re: [Zope-dev] Interface localization: zzLocale 0-0-4a release

2000-11-22 Thread Michel Pelletier


Can we see a screenshot of what the Zope managment interface looks like
in Japanese? (just a personal curiousity)

-Michel

Yves-Eric Martin wrote:
 
 Hello,
 
 Since the SkinnableAndLocalizable project is on hold, and since
 people here in Japan and other non-english speaking countries have
 repeatedly expressed their wish for localized versions of Zope, I
 decided to continue zzLocale development and turn it into an actually
 usable Product. Here is a big step towards it:
 
 zzLocale release 0-0-4a. zzLocale is a Zope locale support Product
 that provides a framework for Zope interface internationalization.
 
 Main new features are:
 
 o New failover code that should break less stuff (previous version broke
 various Products, like ZGadflyDA or LoginManager. All reported
 broken Products are now working)
 o Localization of management tabs
 o Localization of buttons (all should work now).
 o Fixed hideous bug that prevented uninstall
 
 Altogether, this should hopefully make this version actually usable:
 a few things are still not internationalized (like MessageDialogs), but
 it should *work*. Please email me if you can still find things that
 break when using zzLocale.
 
 Download urls:
   from zope.org:   http://www.zope.org/Members/yemartin/zzLocale
   from zope.ne.jp: http://www.zope.ne.jp/users/yemartin/zzLocale
 
 Note that no actual localization file is provided with this release.
 Language packs will be made available as we receive translations. (If
 you have a few hours to kill, how about translating Zope into your
 mother tongue (if it is not English)? ;) ).
 
 Cheers,
 
 --
 Yves-Eric Martin
 Digital Garage Inc.
 [EMAIL PROTECTED]
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

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




Re: [Zope] Still More Problems On the Install...

2000-11-19 Thread Michel Pelletier

Ben Ocean wrote:
 
 At 11:14 AM 11/19/2000 -0500, you wrote:
 Are you sure you need the source version? The binary is easier to install.
 
 Well, that *was* easier (now that I figured out which is which). First of
 all, apologies to all you hard-core techies for whom this is so easy, *but*...
 I got as far as *./install* and all worked fine (on the binary). Now
 what??? I've combed the README and INSTALL texts looking for answers, been
 on the Web site, still can't figure out what I'm supposed to do next.

All of your questions so far are answered in the Book.

http://www.zope.org/Members/michel/ZB/UsingZope.html

You've gotten to the section "Starting Zope on UNIX".

-Michel

___
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] The new Python Method renaming Poll

2000-11-16 Thread Michel Pelletier


http://www.zope.org/Members/michel/Scratch/Poll

Hope Netscape doesn't mess up my formatting on the rest of this.  The above link goes 
to the 
HTML version if it does!

-Michel

The New and Improved Python Method Poll

  We recently held a poll on Zope.org about renaming Python Methods.  The
  poll turned out to be a bit of a disaster for several reasons, but at
  least we learned our lesson and this time, hopefully, we're gonna do it
  the right way.

  *Why* do we want to rename Python Methods?

We want to rename Python Methods because they are not methods in
Python.  There are already things in the Python language called
"Methods" and what we currently call "Python Methods" do not look or
act much like real methods written in Python.  To illustrate the point,
Jim recently told me that he went up to PythonLabs to visit, and when
he showed them Python Methods their reaction was "These aren't Python
Methods.", and they should know!  So we have two choices:

  1) Change the behavior of Python Methods so that they look and act
 like methods in Python, instead of what they are now, or

  2) Keep the existing behavior and change the name.

We discarded the first choice because we like the existing behavior, we
find it useful for through the web development, and we have invested a
lot of thought and engineering into it.  Changing the behavior would
effect lots of things, so we decided to go with the second choice.  The
second choice is good because it requires little labor, but it is not
an *easy* choice to make, especially for us since we're all pretty
biases and geek-headed.  

This is where you come in.  We want you to vote from a selection of
internal and community solicited new names for Python Methods.

  What was wrong with the last Poll?

In the last poll, "Method" won "hands
down":http://www.zope.org/Members/hathawsh/poll/viewStats.  But the
poll was obviously a bit biased, no justification was given as to *why*
we wanted to rename Python Methods and "Method" was mentioned all over
the poll, it was even a choice!  To quote Jim, the poll was a lot like
asking the question "Who is buried in Grant's tomb?".  Duh.

Also, there were lots of candidate names, but with no context, who
could really choose one?  There were no justification for names, and
many of them that were fairly reasonable scored almost dead last.  So,
we're gonna do things a little differently in this poll.

  How does the new poll work?

*Once again* we will be soliciting names from inside DC and from the
community.  In addition to submitting a name, we encourage you to also
submit a one-liner description or justification for you name, it can be
in any form, Haiku poetry, a Dutch sea-shanty, a Monty Python quote,
anything *relevant* to encourage people to vote for your entry.

We will also have a front-page blurb on the poll that you must read in
order to vote.  It will describe the reasons and justification's behind
the new poll, and why we want to rename Python Methods.  "Method" will
not be an option, so please don't submit it.

  When is the new poll?

The new poll will start on Monday, November 27th, 2000 and go until the
following Friday.  Name submission are due by the Friday before the
poll, November 24th, 2000.

  How do I submit a candidate?

Send an email with the subject line "Python Method name candidate" to
"[EMAIL PROTECTED]":mailto:[EMAIL PROTECTED].  Your email must
contain at least the name you propose, but it may also contain a
*short* paragraph justifying why you think your name should be chosen.

I will compile the list of candidates the Friday before the Poll
begins.  Your welcome and encouraged to discuss possibilities on the
mailing lists, but please, since I don't have all the time in the world
to troll the list, if you don't send me an email, I will not add your
candidate to the list!

Thanks, and Good Luck to all!

___
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] The new Python Method renaming Poll

2000-11-16 Thread Michel Pelletier

Andrew Kenneth Milton wrote:
 
 +---[ Michel Pelletier ]--
 |
 | asking the question "Who is buried in Grant's tomb?".  Duh.
 
 Perhaps for the non-americans, someone can tell us why the answer to this is
 'nobody.'

Oops.  Ulysses S. Grant is buried in Grant's tomb. He was President of
the US from 1869-1877.  The question "Who's buried in Grant's tomb?" is
from, I belive, a Marx Brothers' skit.  The answer is supposed to be
obvious (to Americans, at least).

-Michel

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




Re: [Zope] How do I form an XML-RPC query to a remote server?

2000-11-15 Thread Michel Pelletier

Tony McDonald wrote:
 
 Hi all,
 I'm experimenting with collating data from a remote database that uses
 XML-RPC.
 
 I can send it messages like;
  import xmlrpclib
  medweb = xmlrpclib.Server("http://bogus.server.com")
  medweb.getImages('scar')
 '?xml version="1.0" encoding="ISO-8859-1"
 ?\015\012\011data\015\012\011\011titleMedwebb Images/title \0
 
 (lots of stuff snipped)
 
 But I just can't figure out how to send the XML version of the same query,
 ie
 ?XML VERSION="1.0"?
 methodCall
 methodNamegetimages/methodName
 params
 param
 valuestringscar/string/value
 /param
 /params
 /methodCall
 
 to the server.

How does it fail?  Did you set the right content type (text/xml I
think?)?

Why do you want to send a hand built query to the server?  That's what
xmlrpclib is for.

-Michel

 I've got a nasty feeling that when I get told how to do this, I'm going to
 slap my forehead bloody hard

Do what I do, where a helmet to work.

___
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] Are there any man pages out there for these functions?

2000-11-10 Thread Michel Pelletier

[EMAIL PROTECTED] wrote:
 
 Howdy Folks,
 
 I'm looking for man pages on these dtml functions?
 
 I'm finding it terribly difficult and frustration to figure out how to
 properly program in dtml since I can't do a man on a funtion
 (ie:man objectValues) and read about what parameters the function is
 expection from me.
 
 I'd like to browse the dtml man pages and see what functions are
 available to me. I've been reading all kinds of documents for the last
 week but I get the feeling that Zope is somewhat immature as a product.
 
 So, any ideas about those man pages?

Yes, in Zope, click the 'Help' button.  On the left is a navigation
tree, open 'Zope Help' and then open 'API Documentation'.  For
documentation on 'objectValues' for example, look at the 'ObjectManager'
API screen.  It's not very discoverable; we need to work on making a
better help interface.

-Michel

___
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] Zope Book (Error and Suggestion)

2000-11-08 Thread Michel Pelletier

The Doctor What wrote:
 
 At least I think it's an error (either in my understanding or in the
 book).
 
 First off, I think the books great. Finally something that's trying
 to explain what's going on.  Zope looks so cool, but it's been hard
 for a hardcode PHP and Perl programmer like me to get my brain around it.
 
 Anyway, my suggestion is that all the image URLs be fixed so that
 your book can be easily mirrored with normal web-tools.  Perhaps
 even offer a version that's downloadable.  When I went to mirror it,
 my mirror software choked on image urls like:
 http://www.zope.org/Members/michel/ZB/SimpleExamples.html/Figures/5-7.png
 
 The mirror was so I can use it at home where I don't have a
 reasonable net access (very flaky 56k, it hoses up frequently as
 it's through work).
 
 The error or problem that I have run into is that I can't get the
 Guest Book in chapter 5 to work.  They python method listed there
 does not work for me.  I'm using Debian Unstable (Woody) with these
 versions of packages:
 ii  zope   2.2.2-3The Z Object Publishing Environment
 ii  zope-bytecodeh 0.1.7-2Rewrite bytecode of functions to do unlikely
 ii  zope-pythonmet 0.1.7-2Allows ZopeMethods to be written in plain Py
 
 That's bytecodehacks and pythonmethods on the bottom there.

This is an old version of python method.  You need to d/l python method
out of cvs in order to get the book example working.

-Michel

___
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] [Fwd: [Zope-dev] Vote on the new name for Python Methods!]

2000-11-07 Thread Michel Pelletier


Please vote folks!

-Michel

Shane Hathaway wrote:
 
 Being Election Day in the United States, now is a good time to vote on
 the new name for Python Methods.
 
 Python Methods are a relatively new concept for Zope. They give you the
 features of DTML, such as through-the-web editing and security, while
 providing a familiar, refined syntax.
 
 But before we can fold them into the Zope core, you need to help us
 choose the right name for them. Some have voiced the opinion that the
 name "Python Method" is confusing because it can just as easily refer to
 methods in standard Python modules.
 
 There are some interesting alternatives, so please cast your vote!
 
 http://www.zope.org/Members/hathawsh/poll
 
 ___
 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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope-dev] ZClasses not copyable - why?

2000-11-06 Thread Michel Pelletier

Philipp Auersperg wrote:
 
 It is not posible to copy ZClasses, when I try to copy a ZClass
 in the Management Interface I get the error:'The Item 'blorf' does not support 
that operation'
 
 I digged into that and found that in the ZClass.py there exists a method
 
 def cb_isCopyable:
 pass
 
 I was so crude to replace the pass with a 'return 1', restarted Zope and
 could now copy ZClasses as I wanted it.
 
 -
 My first question now:

(zero indexed questions, I love it)

 0.Why are ZClasses not copyable?

I don't know.

 1.Do I shoot into my foot with my hack or is that OK?

I don't know, but I suspect you're aiming the gun in that general
direction.
 
 -
 
 And now my second question
 I am working on a ZClass-intensive project and sometimes I
 want to add/remove base classes of a ZClass without redefining the whole class 
manually.

The usual method for this is to subclass from a class you define in
Python, then you can change the base classes of that python class
easily.  For this you need to make a python product with your class in
it and initialize the product, registering the class as subclassable. 
There's probably a how-to on it somewhere, otherwise you can check out
lib/python/Products/ZCatalog/__init__.py to see how the ZCatalog class
is made ZClass subclassable.

-Michel

___
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] Zope Book Beta

2000-11-06 Thread Michel Pelletier

Robin Becker wrote:
 
 In article [EMAIL PROTECTED], Michel Pelletier
 [EMAIL PROTECTED] writes
 Robin Becker wrote:
 
 ...
 I belive all reference to xslt methods has been removed.  Python methods
 will be part of the 2.3 release, and Perl methods are mentioned in the
 book as being a component add on that must be installed.
 
 
 well I think I read about them in the recently released beta, not how
 they work, but I didn't pluck the name out of thin air.

Ah you are correct, I just removed the references to them.  I thought
they were purged when we removed the xml chapter.
 
  So is there an alpha of this future zope that we could
  use to check the book?
 
 Check out Zope and Python Methods from CVS.  Perl Methods can be
 downloaded from the Perl wiki on (I believe) dev.zope.org.
 
 -Michel
 
 
 I'm using the CVS checkout of Zope2, where are python methods in the CVS
 tree?

I'm not sure, I suspect you would ahve to check them out of a branch,
and I don't know how to do that from the public CVS.  I'll make some
inquiries.

-Michel

___
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] Zope Book Beta

2000-11-05 Thread Michel Pelletier

"Jan H. Haul" wrote:
 
 The point is that we should be able to give meaningful feedback,
 like "page 147, line 15: there should be their" (a totally
 made-up example, do not go hunting for that one).
 It just does not do to quote full sentences and have the
 copyeditor search for all that stuff. Too much wasted time on
 both ends.

Jan,

We have very little experience in documentation delivery and
maintenance.  It's sad but true.  We are however working to resolve the
problem.  Please take a look at the documentation process wiki, where we
have a section for discussing delivery issues:

http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess/FrontPage

Look under 'CurrentIssues'.  Please place any suggestions or ideas you
have there.

-Michel

___
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] Zope Book Beta

2000-11-05 Thread Michel Pelletier

Robin Becker wrote:
 

 I agree about the numbering, but even more I would like to know which
 version of Zope the book is supposed to be about. 

When it hits the shelves, it will be about 2.3.  After that, we will
maintain the book to be in sync with the current release according to
the as-yet-unofficial documentation development process:

http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess/FrontPage

 It mentions stuff such
 as XSLT methods, perl methods and python methods none of which are in an
 official zope. 

I belive all reference to xslt methods has been removed.  Python methods
will be part of the 2.3 release, and Perl methods are mentioned in the
book as being a component add on that must be installed.

 So is there an alpha of this future zope that we could
 use to check the book?

Check out Zope and Python Methods from CVS.  Perl Methods can be
downloaded from the Perl wiki on (I believe) dev.zope.org.

-Michel

___
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] More updates on documentation documentation

2000-11-05 Thread Michel Pelletier


I've added more updates on documentation and worked in the comments
recieved from Shane.  To help you help us, I added some text on where we
need the most attention, check the CurrentIssues for more info.

http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess/FrontPage

This process will define how we create documentation at Digital
Creations, and will have far-reaching effects on how each of us
contributes, maintains, and understands documentation.  So far, Amos and
I have proposed a prototype documentation process for synthesis,
authoring, editing, reviewing, delivering, and maintaining documentation
based on our experiences writing the Zope Book.  We have tried hard to
be as realistic as possibly in defining a very workable process, but our
experience is obviously limited to one artifact, and the pain of living
with no real process to date.

We would really like to hear what you all have to say about our proposal
and our prototype.  If you think our prototype has holes in it, please
leave your comments in the wiki and we will take them very seriously. 
We would like to hear comments from:

The PythonLabs folks, since they have lots of experience authoring,
maintaining and delivering extremely useful documentation.  

The ZDP folks, who represent the segment of the community most
interested in documenting Zope.

The DC geeks, since this process will effect, fundamentally, how we all
do our jobs.

The community developers, since they represent an audience for whom we
have little documentation, and where we will focusing much of our
upcomming efforts.

The community users, since they represent the need for the highest
clarity, best documentation, and because they represent the majority
audience.

In other words, we want to hear from you all!  Our goal is to make
documentation one of Zope's best features, so let us know how you think
we can do that!

Thanks,

-Michel

___
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] insert but updates don't work

2000-11-04 Thread Michel Pelletier

Graham Chiu wrote:
 
 I have this rather curious problem with Zope 2.1.3 on WinNT.
 
 I have a zsql query which returns a number of records.  I
 want to do an update on the same table that is being queried
 for each record returned, but get an authentication
 challenge that I can not pass.
 
 If instead I do, eg, an insert into another table with each
 value returned, it works fine.  Is there something special
 about sql updates?

There shouldn't be, are you using DTML in both methods?  If so, I
suspect one of the methods is using DTML which requires higher
authentication privledges.

-Michel

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

2000-11-04 Thread Michel Pelletier

Douglas Daniel Del Frari wrote:
 
 Greetings!
 
 I am graduation student and I come using the platform zope for
 development of  systems directed to education.

Cool.

 One of the main
 doubts when using zope, not only the syntax, but  also as to use it to
 develop applications using methodologies (former UML). As to use
 concepts  of Objects Oriented : inheritance, aggregation, dependence...?
 Using its it of management screen?

I'm not sure what you mean Douglas, do you want to know:

1) If we apply a design methedology to Zope or

2) How you can apply a design methedology to Zope?

-Michel

___
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] zope book AppendixA error

2000-11-03 Thread Michel Pelletier

Didier Georgieff wrote:
 
 Hello,
 I guess DC people is already aware, but i get an error since
 yesterday while pointing to ZB/AppendixA.html
 
 Document Template Parse Error
 
  invalid parameter: "="Expression"]...", for tag dtml-let
 [Name=Variable][Name="Expression"]..., on line 421 of
 AppendixA.html

Fixed.

-Michel

___
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] error in Zope book

2000-11-03 Thread Michel Pelletier

michael angelo ruberto wrote:
 
 in chapter 5 the example Creating a File Library has an error in the sorting
 method.
 

 ---ERROR
 ---
 
 dtml-in expr="objectValues('File')"
 
 ~this should be dtml-in expr="PARENTS[0].objectValues(['File'])"
 ~it doesn't work otherwise.
 

The reason why it doesn't is because you are using a DTML Document
instead of a DTML Method:

DTML can help you save time maintaining this library. Create an
*index_html* DTML Method in the *Files* folder to list all the
 ^^^
files in the library::

-Michel

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

2000-11-02 Thread Michel Pelletier

Greetings,

Amos and I have done some work in the fishbowl this week.  We have
started a new project to define the process for writing Zope
documentation.

This fishbowl project can be found at:

http://dev.zope.org/Wikis/DevSite/Projects/DocumentationProcess/FrontPage

The idea here is to open up as much as possible the process for
determining the process of writing documentation.  In case you don't
follow that, let me put it a different way: We are using the Zope
fishbowl process to develop a *new* process for writing documentation. 
One of the goals of this new process is to work itself into the existing
fishbowl process for Zope projects, so that everyone has a clear
documentation vision.  All this gets a bit weird; meta-documentation and
developing a process with The Process in order to modify The Process,
but you'll get the idea if you read the wiki.

What this is *not* is a roadmap for existing or future documentation
artifacts.   In other words, if you looking for juicy bits on the
Developer's Guide or some other discreet Zope documentation artifact,
you won't find it here.  Because no process exists yet for writing
documentation, we have not addressed these issues.  When this project is
completed, we will have a complete roadmap that everyone can understand
for writing documentation, and then we will address the issues of actual
documentation artifacts, like where they belong in CVS and format issues
etc.

So please check it out and leave your comments in the Wiki.

Thanks,

-Michel

___
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] Zope Book Beta

2000-11-01 Thread Michel Pelletier

Fred Yankowski wrote:
 
 I agree completely that the Zope Book beta will get more reviewers,
 and better feedback to the authors, if it is available as PDF.

I agree, but this is completely out of our hands and we must focus more
on content issues at this point then distribution issues.  All of these
problems will get solved in the comming months, they just won't get
solved today.

-Michel

___
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] Zope Book Beta

2000-11-01 Thread Michel Pelletier

Tim Lynch wrote:
 
 I wholeheartedly agree with Jason and Chris. I would very much appreciate a
 PDF version that could be easily printed, or read with Adobe's Reader. I hope
 there is no hesitation over making a PDF version available because of fear it
 will cut into sales of the bound volume. I think it would be just the opposite.
 I can easily think of examples (the original Tcl/Tk book comes first to mind)
 where the printed copy closed the sale of the bound volume for me.

I do not know what the reasons is.  I do know that when the book hits
the shelf, it will go under an open content license and we will be free
to distribute it in a myriad of flavors and you will have the freedom to
do with it what you please (according to the license).

 I'll be purchasing multiple copies of the Zope book for my shop regardless.

Thanks. ;)

-Michel

___
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] Zope Book Beta

2000-11-01 Thread Michel Pelletier

Jason Cunliffe wrote:
 
 - Original Message -
 From: Chris Withers [EMAIL PROTECTED]
 
   Not yet. I think that O'Reilly doesn't want us to produce any more
   public versions of the book until it is published. I'm double checking
   with them right now. Take a look at the copyright verbage on each book
   page to see what I'm talking about.
 
  Kinda tough to check out/read/find mistakes in a book that's only
  available as a set of html pages that aren't full text searchable
 
 This is a really good point.
 
 Just as open source benefits from real-time peer review, so do manuscripts
 get better when fresh eyes and minds and go over them.
 
 How about 'releasing' a PDF / HTML Doc with header/footers clearly marked:
 'Preview Review copy for Copy-Editing use only. Not for general public or
 commercial distribution'

This is a good idea and probably a good compromise, but this would
require us taking the time to negotiate it with O'Reilly and engineer a
stx-pdf converter and pre-empt alot of work we have lined up for the
book and other documentation efforts.  With the existing setup, we don't
have to worry about this for a couple months and we don't have to stir
the shit with O'Reilly.

 The number of people who are likely to 'bootleg' the Zope book must be tiny.

I agree, and honestly, Amos and I don't care about the bootlegging or
book sales revenue.  It is also not our job to enforce the rules; I
would chuckle to hear about people 'bootlegging' ilicit PDF copies of
the book.

 Most will want to see the book sales thrive,

Yeah, NY Times bestseller list!!!

 so that Zope grows and gets the
 wider recognition it deserves.And to save time and money when developing
 Zope projects.
 For such sophisticated 'free' software, a well written, well edited book is
 a trivial price to pay.
 
 The issue is how to get the best final copy to the printer in timely manner.

Well... from your perspective (and ours) but from O'Reilly's I think
they're woried about *who* the first person to print that best final
copy is.  Those are the people they are worried about bootlegging the
book, not you, they _know_ you'll buy a copy.  ;) If we open content it
now, someone could beat ORA to the shelves by a week and undercut a
sizable percentage of sales and all they would ahve to do is put ORAs
name on the cover, but they don't get any money.

I feel your pain on all issues.  A couple more months and this will all
go away.

-Michel

___
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] Re: [Zope-book] Re: [Zope] Zope Book Beta

2000-10-31 Thread Michel Pelletier

Wolfgang Strobl wrote:
 
 On 31 Oct 2000, at 10:39, Amos Latteier wrote:
 
  I believe that O'Reilly doesn't want the book redistributed before it is
  printed.
 
 It's gone.
 
  I'll recheck with them.
 
 No need to.
 
 But what is the meaning of This is the one to print out and give to
 your friends as christmas gifts, folks, so get crackin and start
 reading at." in the announcement?

That was a joke.  Sorry.

-Michel

___
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] Zope Book Beta

2000-10-31 Thread Michel Pelletier

Chris Withers wrote:
 
 There a PDF of it anywhere?

No, we won't produce one until the book goes to an open content license
when it hits the shelf.

-Michel

 
 cheers,
 
 Chris
 
 Michel Pelletier wrote:
 
  Amos and I are gibbering like madmen with excitement to announce the
  Zope Book Beta.  This is the complete, technical draft of the book with
  all screenshots (but minus illustrations, those are on there way!).
  Some other things like a colophon and information about the authors is
  missing. The beta includes all completed chapters, the API reference,
  and the DTML reference.  We've received over a hundred comments,
  corrections, and ideas from you the community and it has made a much
  better book.  This is the one to print out and give to your friends as
  christmas gifts, folks, so get crackin and start reading at
  http://www.zope.org/Members/michel/ZB/.
 
  Enjoy,
 
  -Michel
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope-dev] Streaming?

2000-10-30 Thread Michel Pelletier

Lalo Martins wrote:
 
 Never mind, I found it. Just for the record, if anyone else
 needs this:
 
snip
 
 I don't know if this is documented somewhere, but it does what
 I wanted.

It is documented in the online help system, under API documentation,
under the 'Response' object.

-Michel

___
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] Zope Book Beta

2000-10-30 Thread Michel Pelletier


Amos and I are gibbering like madmen with excitement to announce the
Zope Book Beta.  This is the complete, technical draft of the book with
all screenshots (but minus illustrations, those are on there way!). 
Some other things like a colophon and information about the authors is
missing. The beta includes all completed chapters, the API reference,
and the DTML reference.  We've received over a hundred comments,
corrections, and ideas from you the community and it has made a much
better book.  This is the one to print out and give to your friends as
christmas gifts, folks, so get crackin and start reading at
http://www.zope.org/Members/michel/ZB/.

Enjoy,

-Michel

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




Re: [Zope] dtml-while

2000-10-29 Thread Michel Pelletier

Diego Rodrigo Neufert wrote:
 
 Why there isnt a dtml-while function in Zope?

DTML is not meant to be used for general purpose, logic programming. 
It's a presentation and layout language.  Additionally, a while
construct would allow you to create indeterminate loops:

dtml-while 1
 ...
/dtml-while

and you're not allowed to loop indefinately in DTML.  It's against the
rules.  dtml-in does all the looping you need over a python sequence,
since DTML doesn't let you build infinite sequences, all loops
terminate.

The solution to your problem is to you Python Methods.

http://dev.zope.org/Members/4am/PythonMethod

Python does have a while construct and is indented for programming
logic.

-Michel

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




Re: [Zope-dev] Michel's Reply

2000-10-25 Thread Michel Pelletier

Toby Dickenson wrote:
 

Sorry for the delay (book ... crushing ... head ... )

 Perhaps the hippo analogy isnt helping, so heres a more concrete example. In
 zope today it is possible for a user who has been granted the 'View
 Management Screens' permission in *one* folder to create a one-line dtml
 method that lets him see the management page of any other dtml method in the
 whole site.

Even above where the user is defined?  Are you sure?  That would be a
bug.

Your arguments are all pretty solid, I think we are just looking at
things from different perspectives. 
 
   Ive now nearly finished converting all my newbie zope
  projects back to
   a conventional O-O design. I have been bitten by all the problems
   listed above. The feed method *should* *be* implemented in
  a ZooAnimal
   base class.
 
  Ok, that's a valid approach.
 
 Can you explain any advantage of the approach you are advocating?

We're working to make Zope usable from the perspective of many
different, possibly non-programming users.  I agree that a feed method
on an animal base class is a good way to do it from the perspective of
an python OO programmer (which you and I are), but people need to be
able to pick up, say, our book, and start creating useful dynamic
content by dropping in objects, scripts, HTML and other stuff they can
grok.  

I agree that this can also be a hinderance, I did some training in
california a few months ago and the company was doing all of their
application in DTML and external Methods and I convinced them (rather
easily because they were all coders) to make a Python product instead.  

Zope's audience can be pictured, like many things, as a bell curve. 
We're (most of us at least) all sittin' up on the top of the hump
looking down.  Understanding the perspective of someone at the bottom
looking up is essential to making sure Zope succeeds.

Python Methods are a perfect example of an object that is useful to us
at the top for advanced things, like methods of a animal base class we
use in our complex Zoo application, but they are also just as useful to
those at the bottom, as a simple little script written in python that
feeds the hippos.  Or unobfusicates their DTML.  Or iterates over a
database query.  It's useful and saves the time of these novice Zope
users if these methods can be flexible and reusable in different
contexts.  To me, this is the heart of the container vs. context binding
argument.  We at the top ususaly want the container because we're
engineering methods on classes.  Those at the bottom usually want
context for entirely different reasons.  Evan has done a great job
making an object that satisfies the entire spectrum, but in the process
has come up with something that is not entirely unlike a method in
python.

I'm not longer arguing or advocating a particular stance on container
vs. context, Evan talked me into the legitimacy of both approaches. 
Right now, I'm arguing that we need a name that makes sense to
everybody.  'Method' makes sense to us at the top, but not to those on
the bottom, and there are a lot more of those people than us.

-Michel

___
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 Great Python (and Perl) Method Renaming Poll

2000-10-23 Thread Michel Pelletier


We will be conducting a community poll to decide what to call Python
(Perl, insert your language here) Methods.

Many candidates have been discussed, but I'm afraid I don't have enough
time to cull all the candidates from the discussions.

So, before the poll, we are calling for nominiations from the
community.  Please send me an email containing one or more candidate
names.  These names will be added to the list.  No pre-screening will be
done, so please exercise some discretion if your favorite name is more
tounge-in-cheek than practical (you never know what the masses will
decide though!).

Later this week, I will create a web poll where you can vote for your
favorite.

thanks,

-Michel

___
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] The Great Python (and Perl) Method Renaming Poll

2000-10-23 Thread Michel Pelletier


We will be conducting a community poll to decide what to call Python
(Perl, insert your language here) Methods.

Many candidates have been discussed, but I'm afraid I don't have enough
time to cull all the candidates from the discussions.

So, before the poll, we are calling for nominiations from the
community.  Please send me an email containing one or more candidate
names.  These names will be added to the list.  No pre-screening will be
done, so please exercise some discretion if your favorite name is more
tounge-in-cheek than practical (you never know what the masses will
decide though!).

Later this week, I will create a web poll where you can vote for your
favorite.

thanks,

-Michel

___
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] Re: Michel's Reply

2000-10-20 Thread Michel Pelletier

Chris Withers wrote:
 
 From: Michel Pelletier [EMAIL PROTECTED]
 

Hmm.  I thought this was a internal series of emails, I just now noticed
that zope-perl got cc:ed on them somewhere in the middle.  Oh well, it
is some good discussion; I allways like to stir the shit!

-Michel

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




  1   2   >