Move errno imports back to individual functions.
diff --git a/Lib/os.py b/Lib/os.py
index 7d44dc4..c8cc274 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -25,8 +25,6 @@
import sys
-from errno import ENOENT, ENOTDIR, EEXIST
-
_names = sys.builtin_module_names
# Note: more names are added to __all__ later.
@@ -158,6 +156,7 @@
recursive.
"""
+ from errno import EEXIST
head, tail = path.split(name)
if not tail:
head, tail = path.split(head)
@@ -366,6 +365,8 @@
__all__.extend(["execl","execle","execlp","execlpe","execvp","execvpe"])
def _execvpe(file, args, env=None):
+ from errno import ENOENT, ENOTDIR
+
if env is not None:
func = execve
argrest = (args, env)