Home
last modified time | relevance | path

Searched refs:mod_name (Results 1 – 25 of 71) sorted by relevance

123

/external/python/cpython2/Lib/
Drunpy.py26 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/
Drunpy.py27 def __init__(self, mod_name): argument
28 self.mod_name = mod_name
29 self.module = types.ModuleType(mod_name)
33 mod_name = self.mod_name
35 self._saved_module.append(sys.modules[mod_name])
38 sys.modules[mod_name] = self.module
43 sys.modules[self.mod_name] = self._saved_module[0]
45 del sys.modules[self.mod_name]
65 mod_name=None, mod_spec=None, argument
80 run_globals.update(__name__ = mod_name,
[all …]
/external/python/cpython2/Lib/test/
Dtest_runpy.py86 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 …]
Dtest_zipimport_support.py111 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)
Dtest_zipimport.py227 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/
Dtest_runpy.py160 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 …]
Dtest_zipimport_support.py116 mod_name = mod.__name__.split(".")[-1]
117 mod_name = mod_name.replace("sample_", "sample_zipped_")
118 sample_sources[mod_name] = src
126 for mod_name, src in sample_sources.items():
127 z.writestr(mod_name + ".py", src)
/external/ltp/lib/
Dtst_module.c32 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_/
Dtest_meta_path.py26 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/toybox/toys/other/
Drmmod.c28 char * mod_name; in rmmod_main() local
32 mod_name = basename(*toys.optargs); in rmmod_main()
35 len = strlen(mod_name); in rmmod_main()
36 if (len > 3 && !strcmp(&mod_name[len-3], ".ko" )) mod_name[len-3] = 0; in rmmod_main()
41 if (delete_module(mod_name, flags)) in rmmod_main()
42 perror_exit("failed to unload %s", mod_name); in rmmod_main()
/external/python/cpython3/Python/
Ddynload_shlib.c103 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/include/old/
Dold_module.h47 void tst_module_exist(void (cleanup_fn)(void), const char *mod_name,
62 const char *mod_name, char *const argv[]);
70 void tst_module_unload(void (cleanup_fn)(void), const char *mod_name);
/external/ltp/testcases/lib/
Dtest.sh355 local mod_name="$1"
357 if [ -f "$mod_name" ]; then
358 TST_MODPATH="$mod_name"
362 local mod_path="$LTPROOT/testcases/bin/$mod_name"
369 mod_path="$TST_STARTWD/$mod_name"
376 tst_brkm TCONF "Failed to find module '$mod_name'"
/external/igt-gpu-tools/lib/
Digt_kmod.h31 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);
Digt_kmod.c119 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/
Dpp.c131 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/
Dfix_renames.py63 mod_name = results.get("module_name")
68 if mod_name and attr_name:
69 new_attr = unicode(LOOKUP[(mod_name.value, attr_name.value)])
Dfix_imports.py125 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/
Dfix_renames.py63 mod_name = results.get("module_name")
68 if mod_name and attr_name:
69 new_attr = LOOKUP[(mod_name.value, attr_name.value)]
Dfix_imports.py125 mod_name = import_mod.value
126 new_name = self.mapping[mod_name]
131 self.replace[mod_name] = new_name
/external/python/cpython3/Lib/multiprocessing/
Dspawn.py240 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/tests/
Dtest_depends.py13 mod_name = 'setuptools.tests.mod_with_constant'
14 val = depends.get_module_constant(mod_name, 'value')
/external/llvm-project/clang/test/Index/Core/
Dexternal-source-symbol-attr.m3 #define EXT_DECL(mod_name) __attribute__((external_source_symbol(language="Swift", defined_in=mod_n…
4 #define GEN_DECL(mod_name) __attribute__((external_source_symbol(language="Swift", defined_in=mod_n…
5 #define PUSH_GEN_DECL(mod_name) push(GEN_DECL(mod_name), apply_to=any(enum, objc_interface, objc_ca…
/external/python/setuptools/setuptools/
Dsandbox.py159 mod_name for mod_name in sys.modules
160 if mod_name not in saved
162 and not mod_name.startswith('encodings.')
170 for mod_name in list(module_names):
171 del sys.modules[mod_name]
198 def _needs_hiding(mod_name): argument
216 return bool(pattern.match(mod_name))
Dmonkey.py146 def patch_params(mod_name, func_name): argument
150 repl_prefix = 'msvc9_' if 'msvc9' in mod_name else 'msvc14_'
153 mod = import_module(mod_name)

123