1.1 --- a/runclass.py Mon Jan 24 00:46:54 2005 +0100
1.2 +++ b/runclass.py Mon Jan 24 20:08:56 2005 +0100
1.3 @@ -5,6 +5,21 @@
1.4 import javaclass.classhook
1.5 import java.lang
1.6
1.7 +# NOTE: Simple __this__ package loader to potentially avoid repeated import
1.8 +# NOTE: issues exposed by test.py.
1.9 +
1.10 +def load_classes(class_names):
1.11 +
1.12 + "Load the classes with the given 'class_names'."
1.13 +
1.14 + module = __import__("__this__", globals(), locals(), class_names)
1.15 + objs = []
1.16 + for class_name in class_names:
1.17 + objs.append(getattr(module, class_name))
1.18 + return objs
1.19 +
1.20 +# The more general class loader.
1.21 +
1.22 def load_class(class_name):
1.23
1.24 "Load the class with the given 'class_name'."