/external/python/cpython2/Lib/ |
D | runpy.py | 26 def __init__(self, mod_name): argument 27 self.mod_name = mod_name 28 self.module = imp.new_module(mod_name) 32 mod_name = self.mod_name 34 self._saved_module.append(sys.modules[mod_name]) 37 sys.modules[mod_name] = self.module 42 sys.modules[self.mod_name] = self._saved_module[0] 44 del sys.modules[self.mod_name] 63 mod_name=None, mod_fname=None, argument 68 run_globals.update(__name__ = mod_name, [all …]
|
/external/python/cpython3/Lib/ |
D | runpy.py | 26 def __init__(self, mod_name): argument 27 self.mod_name = mod_name 28 self.module = types.ModuleType(mod_name) 32 mod_name = self.mod_name 34 self._saved_module.append(sys.modules[mod_name]) 37 sys.modules[mod_name] = self.module 42 sys.modules[self.mod_name] = self._saved_module[0] 44 del sys.modules[self.mod_name] 64 mod_name=None, mod_spec=None, argument 79 run_globals.update(__name__ = mod_name, [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_runpy.py | 86 def expect_import_error(self, mod_name): argument 88 run_module(mod_name) 92 self.fail("Expected import error for " + mod_name) 133 mod_name = (pkg_name+".")*depth + mod_base 134 return pkg_dir, mod_fname, mod_name 136 def _del_pkg(self, top, depth, mod_name): argument 162 pkg_dir, mod_fname, mod_name = ( 164 forget(mod_name) 166 if verbose: print "Running from source:", mod_name 167 d1 = run_module(mod_name) # Read from source [all …]
|
D | test_zipimport_support.py | 111 mod_name = mod.__name__.split(".")[-1] 112 mod_name = mod_name.replace("sample_", "sample_zipped_") 113 sample_sources[mod_name] = src 121 for mod_name, src in sample_sources.items(): 122 z.writestr(mod_name + ".py", src)
|
D | test_zipimport.py | 227 mod_name = module_path_to_dotted_name(mod_path) 228 __import__(mod_name) 229 mod = sys.modules[mod_name] 235 self.assertEqual(loader.get_source(mod_name), None) 236 self.assertEqual(loader.get_filename(mod_name), mod.__file__) 271 mod_name = module_path_to_dotted_name(mod_path) 272 __import__(mod_name) 273 mod = sys.modules[mod_name] 279 self.assertEqual(loader.get_source(mod_name), None) 280 self.assertEqual(loader.get_filename(mod_name), mod.__file__)
|
/external/python/cpython3/Lib/test/ |
D | test_runpy.py | 160 mod_name = "<Nonsense>" 164 mod_spec = importlib.machinery.ModuleSpec(mod_name, 169 "__name__": mod_name, 181 mod_name, 189 def expect_import_error(self, mod_name): argument 191 run_module(mod_name) 195 self.fail("Expected import error for " + mod_name) 247 mod_name = (pkg_name+".")*depth + mod_base 248 mod_spec = importlib.util.spec_from_file_location(mod_name, 250 return pkg_dir, mod_fname, mod_name, mod_spec [all …]
|
D | test_zipimport_support.py | 117 mod_name = mod.__name__.split(".")[-1] 118 mod_name = mod_name.replace("sample_", "sample_zipped_") 119 sample_sources[mod_name] = src 127 for mod_name, src in sample_sources.items(): 128 z.writestr(mod_name + ".py", src)
|
/external/ltp/include/ |
D | tst_module.h | 10 void tst_module_exists_(void (cleanup_fn)(void), const char *mod_name, 13 static inline void tst_module_exists(const char *mod_name, char **mod_path) in tst_module_exists() argument 15 tst_module_exists_(NULL, mod_name, mod_path); in tst_module_exists() 18 void tst_module_load_(void (cleanup_fn)(void), const char *mod_name, 21 static inline void tst_module_load(const char *mod_name, char *const argv[]) in tst_module_load() argument 23 tst_module_load_(NULL, mod_name, argv); in tst_module_load() 26 void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name); 28 static inline void tst_module_unload(const char *mod_name) in tst_module_unload() argument 30 tst_module_unload_(NULL, mod_name); in tst_module_unload()
|
/external/ltp/include/old/ |
D | old_module.h | 37 void tst_module_exists_(void (cleanup_fn)(void), const char *mod_name, 40 void tst_module_load_(void (cleanup_fn)(void), const char *mod_name, 43 void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name); 56 const char *mod_name, char **mod_path) in tst_module_exists() argument 58 tst_module_exists_(cleanup_fn, mod_name, mod_path); in tst_module_exists() 73 const char *mod_name, char *const argv[]) in tst_module_load() argument 75 tst_module_load_(cleanup_fn, mod_name, argv); in tst_module_load() 84 static inline void tst_module_unload(void (cleanup_fn)(void), const char *mod_name) in tst_module_unload() argument 86 tst_module_unload_(cleanup_fn, mod_name); in tst_module_unload()
|
/external/ltp/lib/ |
D | tst_module.c | 32 const char *mod_name, char **mod_path) in tst_module_exists_() argument 35 if (access(mod_name, F_OK) == 0) { in tst_module_exists_() 37 *mod_path = strdup(mod_name); in tst_module_exists_() 46 ltproot, mod_name) == -1) { in tst_module_exists_() 58 mod_name) == -1) { in tst_module_exists_() 70 mod_name); in tst_module_exists_() 81 const char *mod_name, char *const argv[]) in tst_module_load_() argument 84 tst_module_exists_(cleanup_fn, mod_name, &mod_path); in tst_module_load_() 104 void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name) in tst_module_unload_() argument 108 const char *const argv[] = { "rmmod", mod_name, NULL }; in tst_module_unload_() [all …]
|
/external/python/cpython3/Lib/test/test_importlib/import_/ |
D | test_meta_path.py | 26 mod_name = 'for_real' 28 util.mock_spec(mod_name) as second: 31 self.assertIs(self.__import__(mod_name), second.modules[mod_name]) 70 mod_name = 'top_level' 71 assert '.' not in mod_name 72 with self.mock_modules(mod_name) as importer: 76 self.__import__(mod_name) 80 self.assertEqual(args[0], mod_name) 86 mod_name = pkg_name + '.module' 88 assert '.' in mod_name [all …]
|
/external/python/cpython3/Python/ |
D | dynload_shlib.c | 103 PyObject *mod_name; in _PyImport_FindSharedFuncptr() local 112 mod_name = PyUnicode_FromString(shortname); in _PyImport_FindSharedFuncptr() 113 if (mod_name == NULL) { in _PyImport_FindSharedFuncptr() 120 Py_DECREF(mod_name); in _PyImport_FindSharedFuncptr() 123 PyErr_SetImportError(error_ob, mod_name, path); in _PyImport_FindSharedFuncptr() 125 Py_DECREF(mod_name); in _PyImport_FindSharedFuncptr()
|
/external/ltp/testcases/lib/ |
D | test.sh | 373 local mod_name="$1" 375 if [ -f "$mod_name" ]; then 376 TST_MODPATH="$mod_name" 380 local mod_path="$LTPROOT/testcases/bin/$mod_name" 387 mod_path="$TST_STARTWD/$mod_name" 394 tst_brkm TCONF "Failed to find module '$mod_name'"
|
/external/igt-gpu-tools/lib/ |
D | igt_kmod.h | 31 bool igt_kmod_is_loaded(const char *mod_name); 34 int igt_kmod_load(const char *mod_name, const char *opts); 35 int igt_kmod_unload(const char *mod_name, unsigned int flags);
|
D | igt_kmod.c | 119 igt_kmod_is_loaded(const char *mod_name) in igt_kmod_is_loaded() argument 132 if (!strcmp(kmod_name, mod_name)) { in igt_kmod_is_loaded() 172 igt_kmod_load(const char *mod_name, const char *opts) in igt_kmod_load() argument 178 err = kmod_module_new_from_name(ctx, mod_name, &kmod); in igt_kmod_load() 218 igt_kmod_unload(const char *mod_name, unsigned int flags) in igt_kmod_unload() argument 224 err = kmod_module_new_from_name(ctx, mod_name, &kmod); in igt_kmod_unload() 226 igt_debug("Could not use module %s (%s)\n", mod_name, in igt_kmod_unload() 233 igt_debug("Could not remove module %s (%s)\n", mod_name, in igt_kmod_unload()
|
/external/selinux/policycoreutils/hll/pp/ |
D | pp.c | 131 char *mod_name = mod_pkg->policy->p.name; in main() local 143 if (mod_name && strcmp(mod_name, cil_name) != 0) { in main() 144 …nux userspace will refer to the module from %s as %s rather than %s\n", ifile, mod_name, cil_name); in main()
|
/external/python/cpython2/Lib/lib2to3/fixes/ |
D | fix_renames.py | 63 mod_name = results.get("module_name") 68 if mod_name and attr_name: 69 new_attr = unicode(LOOKUP[(mod_name.value, attr_name.value)])
|
D | fix_imports.py | 125 mod_name = import_mod.value 126 new_name = unicode(self.mapping[mod_name]) 131 self.replace[mod_name] = new_name
|
/external/python/cpython3/Lib/lib2to3/fixes/ |
D | fix_renames.py | 63 mod_name = results.get("module_name") 68 if mod_name and attr_name: 69 new_attr = LOOKUP[(mod_name.value, attr_name.value)]
|
D | fix_imports.py | 125 mod_name = import_mod.value 126 new_name = self.mapping[mod_name] 131 self.replace[mod_name] = new_name
|
/external/protobuf/python/google/protobuf/internal/ |
D | api_implementation.py | 62 def _CanImport(mod_name): argument 64 mod = importlib.import_module(mod_name) 67 raise ImportError(mod_name + ' import succeeded but was None')
|
/external/python/cpython3/Lib/multiprocessing/ |
D | spawn.py | 240 def _fixup_main_from_name(mod_name): argument 246 if mod_name == "__main__" or mod_name.endswith(".__main__"): 250 if getattr(current_main.__spec__, "name", None) == mod_name: 258 main_content = runpy.run_module(mod_name,
|
/external/python/setuptools/setuptools/ |
D | sandbox.py | 161 mod_name 162 for mod_name in sys.modules 163 if mod_name not in saved 165 and not mod_name.startswith('encodings.') 173 for mod_name in list(module_names): 174 del sys.modules[mod_name] 210 def _needs_hiding(mod_name): argument 227 base_module = mod_name.split('.', 1)[0]
|
D | monkey.py | 142 def patch_params(mod_name, func_name): argument 146 repl_prefix = 'msvc9_' if 'msvc9' in mod_name else 'msvc14_' 149 mod = import_module(mod_name)
|
/external/python/setuptools/setuptools/tests/ |
D | test_depends.py | 13 mod_name = 'setuptools.tests.mod_with_constant' 14 val = depends.get_module_constant(mod_name, 'value')
|