Home
last modified time | relevance | path

Searched refs:mod_name (Results 1 – 25 of 52) 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.py25 def __init__(self, mod_name): argument
26 self.mod_name = mod_name
27 self.module = types.ModuleType(mod_name)
31 mod_name = self.mod_name
33 self._saved_module.append(sys.modules[mod_name])
36 sys.modules[mod_name] = self.module
41 sys.modules[self.mod_name] = self._saved_module[0]
43 del sys.modules[self.mod_name]
63 mod_name=None, mod_spec=None, argument
78 run_globals.update(__name__ = mod_name,
[all …]
/external/python/cpython3/Lib/test/
Dtest_runpy.py157 mod_name = "<Nonsense>"
161 mod_spec = importlib.machinery.ModuleSpec(mod_name,
166 "__name__": mod_name,
178 mod_name,
186 def expect_import_error(self, mod_name): argument
188 run_module(mod_name)
192 self.fail("Expected import error for " + mod_name)
245 mod_name = (pkg_name+".")*depth + mod_base
246 mod_spec = importlib.util.spec_from_file_location(mod_name,
248 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/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/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/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/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.c99 PyObject *mod_name; in _PyImport_FindSharedFuncptr() local
108 mod_name = PyUnicode_FromString(shortname); in _PyImport_FindSharedFuncptr()
109 if (mod_name == NULL) { in _PyImport_FindSharedFuncptr()
116 Py_DECREF(mod_name); in _PyImport_FindSharedFuncptr()
119 PyErr_SetImportError(error_ob, mod_name, path); in _PyImport_FindSharedFuncptr()
121 Py_DECREF(mod_name); in _PyImport_FindSharedFuncptr()
/external/ltp/testcases/lib/
Dtest.sh347 local mod_name="$1"
349 if [ -f "$mod_name" ]; then
350 TST_MODPATH="$mod_name"
354 local mod_path="$LTPROOT/testcases/bin/$mod_name"
361 mod_path="$TST_STARTWD/$mod_name"
368 tst_brkm TCONF "Failed to find module '$mod_name'"
/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/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/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/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/multiprocessing/
Dspawn.py229 def _fixup_main_from_name(mod_name): argument
235 if mod_name == "__main__" or mod_name.endswith(".__main__"):
239 if getattr(current_main.__spec__, "name", None) == mod_name:
247 main_content = runpy.run_module(mod_name,
/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)
/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/python/cpython2/Lib/idlelib/
DPathBrowser.py87 mod_name = name[:i]
88 if mod_name not in modules:
89 modules[mod_name] = None
/external/python/cpython3/Lib/idlelib/
Dpathbrowser.py93 mod_name = name[:i]
94 if mod_name not in modules:
95 modules[mod_name] = None
/external/python/oauth2client/docs/
Dconf.py76 sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

123