[Zope-dev] __init__.py

Steve Alexander steve@cat-box.net
Wed, 03 May 2000 13:18:03 +0100


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