21 |
# |
# |
22 |
# $Id$ |
# $Id$ |
23 |
|
|
24 |
|
import os, sys |
25 |
|
|
26 |
from Module import * |
from Module import * |
27 |
from Class import * |
from Class import * |
28 |
from Namespace import * |
from Namespace import * |
29 |
from Definition import * |
from Definition import * |
30 |
from language import Session |
from gnue.appserver.language import Session |
31 |
|
|
32 |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
33 |
# Global module and class list |
# Global module and class list |
39 |
def init (server): |
def init (server): |
40 |
global modules, classes |
global modules, classes |
41 |
# First, load the hardwired default repository |
# First, load the hardwired default repository |
42 |
modules = ModuleDict (None, RepositoryDefinition ("classrep/repository.ini")) |
basedir = os.path.dirname(sys.modules["gnue.appserver.classrep"].__file__) |
43 |
|
modules = ModuleDict (None, RepositoryDefinition (basedir+"/repository.ini")) |
44 |
classes = ClassDict (None, modules) |
classes = ClassDict (None, modules) |
45 |
# Now, we can access the database to load the real repository |
# Now, we can access the database to load the real repository |
46 |
session = Session.Session (server, None, None) |
session = Session.Session (server, None, None) |