[Python-checkins] r52997 - python/branches/release25-maint/Lib/os.py
georg.brandl
python-checkins at python.org
Mon Dec 11 08:56:48 CET 2006
Author: georg.brandl
Date: Mon Dec 11 08:56:43 2006
New Revision: 52997
Modified:
python/branches/release25-maint/Lib/os.py
Log:
Move errno imports back to individual functions.
(backport from rev. 52996)
Modified: python/branches/release25-maint/Lib/os.py
==============================================================================
--- python/branches/release25-maint/Lib/os.py (original)
+++ python/branches/release25-maint/Lib/os.py Mon Dec 11 08:56:43 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