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