[Python-checkins] r52996 - python/trunk/Lib/os.py
georg.brandl
python-checkins at python.org
Mon Dec 11 08:56:39 CET 2006
Author: georg.brandl
Date: Mon Dec 11 08:56:33 2006
New Revision: 52996
Modified:
python/trunk/Lib/os.py
Log:
Move errno imports back to individual functions.
Modified: python/trunk/Lib/os.py
==============================================================================
--- python/trunk/Lib/os.py (original)
+++ python/trunk/Lib/os.py Mon Dec 11 08:56:33 2006
@@ -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)
More information about the Python-checkins
mailing list