mirror of https://github.com/python/cpython
Remove references to platform 'mac'
The 'mac' platform (that is, os.name == 'mac') was used for the MacOS 9 port, which is no longer supported (as of Python 2.4 IIRC).
This commit is contained in:
parent
6a0a368479
commit
81af68ee61
20
Lib/os.py
20
Lib/os.py
|
@ -1,9 +1,9 @@
|
||||||
r"""OS routines for Mac, NT, or Posix depending on what system we're on.
|
r"""OS routines for Mac, NT, or Posix depending on what system we're on.
|
||||||
|
|
||||||
This exports:
|
This exports:
|
||||||
- all functions from posix, nt, os2, mac, or ce, e.g. unlink, stat, etc.
|
- all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
|
||||||
- os.path is one of the modules posixpath, ntpath, or macpath
|
- os.path is one of the modules posixpath, or ntpath
|
||||||
- os.name is 'posix', 'nt', 'os2', 'mac', 'ce' or 'riscos'
|
- os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos'
|
||||||
- os.curdir is a string representing the current directory ('.' or ':')
|
- os.curdir is a string representing the current directory ('.' or ':')
|
||||||
- os.pardir is a string representing the parent directory ('..' or '::')
|
- os.pardir is a string representing the parent directory ('..' or '::')
|
||||||
- os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')
|
- os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')
|
||||||
|
@ -84,20 +84,6 @@ elif 'os2' in _names:
|
||||||
__all__.extend(_get_exports_list(os2))
|
__all__.extend(_get_exports_list(os2))
|
||||||
del os2
|
del os2
|
||||||
|
|
||||||
elif 'mac' in _names:
|
|
||||||
name = 'mac'
|
|
||||||
linesep = '\r'
|
|
||||||
from mac import *
|
|
||||||
try:
|
|
||||||
from mac import _exit
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
import macpath as path
|
|
||||||
|
|
||||||
import mac
|
|
||||||
__all__.extend(_get_exports_list(mac))
|
|
||||||
del mac
|
|
||||||
|
|
||||||
elif 'ce' in _names:
|
elif 'ce' in _names:
|
||||||
name = 'ce'
|
name = 'ce'
|
||||||
linesep = '\r\n'
|
linesep = '\r\n'
|
||||||
|
|
|
@ -33,10 +33,6 @@ import os as _os
|
||||||
import errno as _errno
|
import errno as _errno
|
||||||
from random import Random as _Random
|
from random import Random as _Random
|
||||||
|
|
||||||
if _os.name == 'mac':
|
|
||||||
import Carbon.Folder as _Folder
|
|
||||||
import Carbon.Folders as _Folders
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from cStringIO import StringIO as _StringIO
|
from cStringIO import StringIO as _StringIO
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -153,15 +149,7 @@ def _candidate_tempdir_list():
|
||||||
if dirname: dirlist.append(dirname)
|
if dirname: dirlist.append(dirname)
|
||||||
|
|
||||||
# Failing that, try OS-specific locations.
|
# Failing that, try OS-specific locations.
|
||||||
if _os.name == 'mac':
|
if _os.name == 'riscos':
|
||||||
try:
|
|
||||||
fsr = _Folder.FSFindFolder(_Folders.kOnSystemDisk,
|
|
||||||
_Folders.kTemporaryFolderType, 1)
|
|
||||||
dirname = fsr.as_pathname()
|
|
||||||
dirlist.append(dirname)
|
|
||||||
except _Folder.error:
|
|
||||||
pass
|
|
||||||
elif _os.name == 'riscos':
|
|
||||||
dirname = _os.getenv('Wimp$ScrapDir')
|
dirname = _os.getenv('Wimp$ScrapDir')
|
||||||
if dirname: dirlist.append(dirname)
|
if dirname: dirlist.append(dirname)
|
||||||
elif _os.name == 'nt':
|
elif _os.name == 'nt':
|
||||||
|
|
Loading…
Reference in New Issue