summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-02-24 05:32:32 (GMT)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-02-24 05:32:32 (GMT)
commit5cef57131fc02de55133e4eafdee27fb76456bb8 (patch)
treed22cd58c3f46b5c3564d283eeb8965197b15bb93 /Lib/os.py
parent75a8e65873f8c73f27f353b30bb1de5aceb6b74c (diff)
downloadcpython-5cef57131fc02de55133e4eafdee27fb76456bb8.zip
cpython-5cef57131fc02de55133e4eafdee27fb76456bb8.tar.gz
cpython-5cef57131fc02de55133e4eafdee27fb76456bb8.tar.bz2
OS/2 EMX port Library and regression test changes:
Lib/ os.py os2emxpath.py // added - OS/2 EMX specific path manipulation routines popen2.py site.py Lib/test/ test_fcntl.py test_longexp.py
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/Lib/os.py b/Lib/os.py
index bf31ddc..42812aa 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -95,16 +95,27 @@ elif 'dos' in _names:
elif 'os2' in _names:
name = 'os2'
linesep = '\r\n'
- curdir = '.'; pardir = '..'; sep = '\\'; pathsep = ';'
+ curdir = '.'; pardir = '..'; pathsep = ';'
+ if sys.version.find('EMX GCC') == -1:
+ # standard OS/2 compiler (VACPP or Watcom?)
+ sep = '\\'; altsep = '/'
+ else:
+ # EMX
+ sep = '/'; altsep = '\\'
defpath = '.;C:\\bin'
from os2 import *
try:
from os2 import _exit
except ImportError:
pass
- import ntpath
- path = ntpath
- del ntpath
+ if sys.version.find('EMX GCC') == -1:
+ import ntpath
+ path = ntpath
+ del ntpath
+ else:
+ import os2emxpath
+ path = os2emxpath
+ del os2emxpath
import os2
__all__.extend(_get_exports_list(os2))