summaryrefslogtreecommitdiff
path: root/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py
diff options
context:
space:
mode:
Diffstat (limited to 'AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py')
-rw-r--r--AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py35
1 files changed, 31 insertions, 4 deletions
diff --git a/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py b/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py
index 1a4b73c964..1175518f3e 100644
--- a/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py
+++ b/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py
@@ -1,9 +1,22 @@
-r"""OS routines for NT or Posix depending on what system we're on.
+
+# Module 'os' -- OS routines for NT, Posix, or UEFI depending on what system we're on.
+#
+# Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>
+# Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License that accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+r"""OS routines for NT, Posix, or UEFI depending on what system we're on.
This exports:
- - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
- - os.path is one of the modules posixpath, or ntpath
- - os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos'
+ - all functions from edk2, posix, nt, os2, or ce, e.g. unlink, stat, etc.
+ - os.path is one of the modules uefipath, posixpath, or ntpath
+ - os.name is 'edk2', 'posix', 'nt', 'os2', 'ce' or 'riscos'
- os.curdir is a string representing the current directory ('.' or ':')
- os.pardir is a string representing the parent directory ('..' or '::')
- os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')
@@ -113,6 +126,20 @@ elif 'riscos' in _names:
__all__.extend(_get_exports_list(riscos))
del riscos
+elif 'edk2' in _names:
+ name = 'edk2'
+ linesep = '\n'
+ from edk2 import *
+ try:
+ from edk2 import _exit
+ except ImportError:
+ pass
+ import ntpath as path
+
+ import edk2
+ __all__.extend(_get_exports_list(edk2))
+ del edk2
+
else:
raise ImportError, 'no os specific module found'