mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Some minute changes.
This commit is contained in:
parent
424e4da9f3
commit
dd8cb446e1
4 changed files with 42 additions and 14 deletions
30
Lib/os.py
30
Lib/os.py
|
@ -1,4 +1,4 @@
|
|||
# os.py -- either mac or posix depending on what system we're on.
|
||||
# os.py -- either mac, dos or posix depending on what system we're on.
|
||||
|
||||
# This exports:
|
||||
# - all functions from either posix or mac, e.g., os.unlink, os.stat, etc.
|
||||
|
@ -14,7 +14,7 @@
|
|||
# and opendir), and leave all pathname manipulation to os.path
|
||||
# (e.g., split and join).
|
||||
|
||||
# XXX This will need to distinguish between real posix and MS-DOS emulation
|
||||
# XXX This is incorrect if the import *path fails...
|
||||
|
||||
try:
|
||||
from posix import *
|
||||
|
@ -30,14 +30,24 @@ try:
|
|||
path = posixpath
|
||||
del posixpath
|
||||
except ImportError:
|
||||
from mac import *
|
||||
name = 'mac'
|
||||
curdir = ':'
|
||||
pardir = '::'
|
||||
sep = ':'
|
||||
import macpath
|
||||
path = macpath
|
||||
del macpath
|
||||
try:
|
||||
from mac import *
|
||||
name = 'mac'
|
||||
curdir = ':'
|
||||
pardir = '::'
|
||||
sep = ':'
|
||||
import macpath
|
||||
path = macpath
|
||||
del macpath
|
||||
except ImportError:
|
||||
from dos import *
|
||||
name = 'dos'
|
||||
curdir = '.' # XXX doesn't always work
|
||||
pardir = '..' # XXX doesn't always work
|
||||
sep = '/' # XXX or '\\' ???
|
||||
import dospath
|
||||
path = dospath
|
||||
del dospath
|
||||
|
||||
def execl(file, *args):
|
||||
execv(file, args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue