summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-12-11 07:56:33 (GMT)
committerGeorg Brandl <georg@python.org>2006-12-11 07:56:33 (GMT)
commitf54a63b3b5ff6c0fd2d115206d3cc60591318bb5 (patch)
tree29b48394d9f3d94efb601c11213691e98bc9be7b /Lib/os.py
parent0adf0846cec7d407741723601a8b2b61a646b682 (diff)
downloadcpython-f54a63b3b5ff6c0fd2d115206d3cc60591318bb5.zip
cpython-f54a63b3b5ff6c0fd2d115206d3cc60591318bb5.tar.gz
cpython-f54a63b3b5ff6c0fd2d115206d3cc60591318bb5.tar.bz2
Move errno imports back to individual functions.
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py5
1 files changed, 3 insertions, 2 deletions
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 @@ and opendir), and leave all pathname manipulation to os.path
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 @@ def makedirs(name, mode=0777):
recursive.
"""
+ from errno import EEXIST
head, tail = path.split(name)
if not tail:
head, tail = path.split(head)
@@ -366,6 +365,8 @@ def execvpe(file, args, env):
__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)