Hi, In the process of re-engineering Squishdot to use Catalogs I bumped into __init__.py and wondered if this was out of date as well. I can't tell though 'cos I can't find any documentation on __init__.py, old or new, to work from. Is there any? Also, is there something like a How-To for creating python products (in particular; what should go into __init__.py and what should go into ProductName.py?) using the latest, future proofed, methods? cheers for any help, Chris
Chris Withers wrote:
Hi,
In the process of re-engineering Squishdot to use Catalogs I bumped into __init__.py and wondered if this was out of date as well.
I can't tell though 'cos I can't find any documentation on __init__.py, old or new, to work from. Is there any?
Also, is there something like a How-To for creating python products (in particular; what should go into __init__.py and what should go into ProductName.py?) using the latest, future proofed, methods?
Looking at the one in PTKBase, it seems to have the form: Documentation string __version__ string __ac_permissions tuple def initialize(context): # to register the package's base classes try: # for each class context.registerBaseClass(ModuleName.ClassName, 'Meta-type string') except: Amusing exception message :-) traceback -- Steve Alexander Software Engineer Cat-Box limited
Chris Withers wrote:
Hi,
In the process of re-engineering Squishdot to use Catalogs I bumped into __init__.py and wondered if this was out of date as well.
I can't tell though 'cos I can't find any documentation on __init__.py, old or new, to work from. Is there any?
Also, is there something like a How-To for creating python products (in particular; what should go into __init__.py and what should go into ProductName.py?) using the latest, future proofed, methods?
The Boring howto and the Boring product are helpful here. I have a skeleton document on product development guidelines but it's still a skeleton, ideally there should be somekind of extensive document addressing what to do and what not to do when developing a Zope 'standards-comformant' product. Regards, Martijn
The Boring howto and the Boring product are helpful here. I have a skeleton document on product development guidelines but it's still a skeleton, ideally there should be somekind of extensive document addressing what to do and what not to do when developing a Zope 'standards-comformant' product.
A skeleton is better than nothing :-) How about putting it up on the interfaces Wiki under 'ProductDevelopment' so everyone can haev a look/comment/add to it? cheers, Chris
How about putting it up on the interfaces Wiki under 'ProductDevelopment' so everyone can haev a look/comment/add to it?
Apologies to Michel, this is actually on the Wiki already. It's missing a few bits which are covered in the Boring product but it is, nevertheless, there. What doesn't appear to be there is documentation on manage_options, __ac_permissions__, _properties and other stuff which appears, as standard, in YourProduct.py. Some of this is covered in the Boring product and I found/guessed some more by looking at ZDConfera but is there any official place for all this? cheers, Chris
[Martijn Faassen, on Wed, 03 May 2000] :: Chris Withers wrote: :: > Hi, :: > :: > In the process of re-engineering Squishdot to use Catalogs I bumped into :: > __init__.py and wondered if this was out of date as well. :: > :: > I can't tell though 'cos I can't find any documentation on __init__.py, old or :: > new, to work from. Is there any? :: > :: > Also, is there something like a How-To for creating python products (in :: > particular; what should go into __init__.py and what should go into :: > ProductName.py?) using the latest, future proofed, methods? :: :: The Boring howto and the Boring product are helpful here. I have a :: skeleton document on product development guidelines but it's still a :: skeleton, ideally there should be somekind of extensive document :: addressing what to do and what not to do when developing a :: Zope 'standards-comformant' product. Two things: Last year, Zen made an effort to preserve Amos' Old Product API Tutorial at http://www.zope.org/Members/Zen/howto/ProductAPITutorial and Beehive has a Zope Product called mkproduct, with documentation, which is designed to take the tedium out of product packaging: http://www.zope.de/software/mkproduct/index_eng_html
participants (4)
-
Chris Withers -
Martijn Faassen -
Patrick Phalen -
Steve Alexander