コード例 #1
0
 def __init__(self, identifiers=('$', '@', '%', '&', '*')):
     utils.NormalizedDict.__init__(self, ignore=['_'])
     self._identifiers = identifiers
     importer = utils.Importer(
         'variable file').import_class_or_module_by_path
     self._import_variable_file = partial(importer,
                                          instantiate_with_args=())
コード例 #2
0
def TestLibrary(name, args=None, variables=None, create_handlers=True):
    with OutputCapturer(library_import=True):
        importer = utils.Importer('test library')
        libcode = importer.import_class_or_module(name)
    libclass = _get_lib_class(libcode)
    lib = libclass(libcode, name, args or [], variables)
    if create_handlers:
        lib.create_handlers()
    return lib
コード例 #3
0
 def _import_listener(self, name, args):
     importer = utils.Importer('listener')
     return importer.import_class_or_module(os.path.normpath(name),
                                            instantiate_with_args=args)