Re: [Zope3-Users] is __docformat___ necessary in 3.1 onwards?

2005-10-18 Thread Stephan Richter
On Monday 03 October 2005 02:05, baiju m wrote:
 Should I give __docformat___ = 'restructuredtext'
 in newly writing codes ?

Yes, the default is still structured text until we feel comfortable that 
nearly all docstrings have been converted, which will probably be never. ;-)

 BTW, I think an FAQ indexer like PyGTK FAQ
 (http://www.async.com.br/faq/pygtk/index.py?req=index)
 will be very nice, anything like that exists?
 (I expects lots of silly questions to be answared)

Feel free to start an FAQ like this one. It would certainly be very helpful to 
many people.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zope.app.catalog doc question

2005-10-18 Thread Stephan Richter
On Friday 30 September 2005 15:52, Duncan McGreggor wrote:
 since apply() does expect the rhs of the parameter to be a sequence.  
 With this change, my code now works (no errors, anyway), but I wanted  
 to see if this was a misunderstanding on my part or a documentation  
 typo...

If the above is a doctest it will actually work, but I don't know why. I think 
this is a good issue to bring up on zope3-dev or even file an issue for it.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Override a browser class

2005-10-18 Thread Stephan Richter
On Monday 03 October 2005 04:09, Johan Carlsson wrote:
 PS. The reason I want to change pasteable is that it
 raises an exception if the paste action is unknown.
 I'm implementing a clone action as an extra variation
 of copy and it works in my classes but if I point
 to a stock object (with anything I want to clone in
 the clipbook) I get an error due to the raise.

 My override returns False if the paste action is unknown.

 Any core developer that has any opinion on this?
 Can it be changed in the core or is there a specific
 reason for the raise?

You should bring up the issue on zope3-dev. I have no opinion about it.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] folder list in a vocabulary

2005-10-18 Thread gnotari
I'm writing an application that have an 'authors' folder and a 'book'
folder.

A book should have one or more authors.
I implemented author as a Choice field in every book, and I'm trying a
vocabulary to bring me the list of authors to choose from.

I'm stuck 'cause I can't make out how to obtain the list of objects,
contained in the authors folder, from the vocabulary context.

The structure is

  main
authors  books


(actually is a bit more complicated:

main
authors products
 books   multimedia


There are a good many things I would like to ask the list: I implemented
many things learning from the books and using imagination ;), but this one
will suffice, for a start.

ciao
Guido


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] folder list in a vocabulary

2005-10-18 Thread Stephan Richter
On Tuesday 18 October 2005 08:32, [EMAIL PROTECTED] wrote:
 I'm stuck 'cause I can't make out how to obtain the list of objects,
 contained in the authors folder, from the vocabulary context.

The easiest would be to get the site:

site = zope.component.hooks.getSite()

This should be main, so that

site['authors'].keys()

is what you want.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] First time install problem

2005-10-18 Thread Gary Poster


On Oct 18, 2005, at 3:47 PM, Tim Penhey wrote:


Hi All,

I am using Kubuntu 5.10 (Breezy Badger) and after failing to use the
pre-packaged zope3, I tried to download and install the one from  
zope.org.


Using Python 2.4.2 and gcc 4.0.2.

Since I don't have python2.3 installed (and env 'aint in /bin), I  
had to

change the first line of the test.py from
#!/bin/env python2.3
to
#!/usr/bin/env python

./install.py build worked fine, however ./test.py -v fails on one  
test:


Failure in test testRunIgnoresParentSignals
(zdaemon.tests.testzdrun.ZDaemonTests)
Traceback (most recent call last):
  File /usr/lib/python2.4/unittest.py, line 260, in run
testMethod()
  File
/home/tim/Zope-3.1.0/build/lib.linux-i686-2.4/zdaemon/tests/ 
testzdrun.py,

line 237, in testRunIgnoresParentSignals
self.assert_(is_started, spawned process failed to start in a  
minute)

  File /usr/lib/python2.4/unittest.py, line 309, in failUnless
if not expr: raise self.failureException, msg
AssertionError: spawned process failed to start in a minute

test was run as normal user.

What next?  Given that I am trying to go through the text of Zope 3
Developer's Handbook and Web Component Development with Zope 3  
is it

something that is going to matter to me?


Nope.


Is it a known problem, bug, or
problem with my install?


Known problem AFAIK.  I believe this is the same one as Jim addressed  
here: http://mail.zope.org/pipermail/zope3-dev/2005-September/ 
015851.html


Gary

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Interface tests: NotImplemented or NotImplementedError

2005-10-18 Thread Michel Pelletier



In the Zope 3 book the method is like this:

def makeTestObject(self):
   raise NotImplemented()


...


Looking in some real zope3 tests I saw another version of the method:

def makeTestObject(self):
   raise NotImplementedError()



NotImplemented is a singleton object, introduced in 2.1 (I think), used 
for rich comparision:


http://www.python.org/peps/pep-0207.html

I suspect (although I'm often wrong!) the author of the book you are 
reading might have used it incorrectly.


NotImplementedError is an exception to raise to indicate that a feature 
or method is not implemented.  It's probably the one you want.


-Michel

[EMAIL PROTECTED]

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users