[Jython-checkins] jython: imp now in Python, wrapping _imp
jim.baker
jython-checkins at python.org
Thu Nov 6 11:05:18 CET 2014
https://hg.python.org/jython/rev/923157581df6
changeset: 7409:923157581df6
user: Jim Baker <jim.baker at rackspace.com>
date: Thu Nov 06 11:04:50 2014 +0100
summary:
imp now in Python, wrapping _imp
files:
Lib/imp.py | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/Lib/imp.py b/Lib/imp.py
new file mode 100644
--- /dev/null
+++ b/Lib/imp.py
@@ -0,0 +1,18 @@
+import os.path
+
+from _imp import (C_BUILTIN, C_EXTENSION, IMP_HOOK, PKG_DIRECTORY, PY_COMPILED, PY_FROZEN, PY_SOURCE,
+ __doc__, acquire_lock, find_module, getClass, get_magic, get_suffixes,
+ is_builtin, is_frozen,
+ load_compiled, load_dynamic, load_module, load_source,
+ lock_held, new_module, release_lock, reload)
+
+
+class NullImporter(object):
+
+ def __init__(self, path):
+ if os.path.isdir(path):
+ raise ImportError()
+
+ def find_module(self, fullname, path=None):
+ return None
+
--
Repository URL: https://hg.python.org/jython
More information about the Jython-checkins
mailing list