view templates/detectors/__init__.py @ 27:e5e9ea306a09

moving the bin files to facilitate out-of-the-boxness
author Richard Jones <richard@users.sourceforge.net>
date Mon, 23 Jul 2001 03:46:48 +0000
parents c7c14960f413
children
line wrap: on
line source

#$Id: __init__.py,v 1.1 2001-07-22 12:09:32 richard Exp $

def init(db):
    ''' execute the init functions of all the modules in this directory
    '''
    import os, sys
    this_dir = os.path.split(__file__)[0]
    try:
        sys.path.insert(0, this_dir)
        for file in os.listdir(this_dir):
            file, ext = os.path.splitext(file)
            if file == '__init__': continue
            if ext in ('.py', '.pyc'):
                module = __import__(file)
                module.init(db)
    finally:
        del sys.path[0]

#
#$Log: not supported by cvs2svn $
#

Roundup Issue Tracker: http://roundup-tracker.org/