Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
289086ca
Commit
289086ca
authored
Oct 09, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove more DOS support.
parent
d138c681
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
364 deletions
+6
-364
Lib/dospath.py
Lib/dospath.py
+0
-340
Lib/os.py
Lib/os.py
+6
-24
No files found.
Lib/dospath.py
deleted
100644 → 0
View file @
d138c681
This diff is collapsed.
Click to expand it.
Lib/os.py
View file @
289086ca
r"""OS routines for Mac, DOS, NT, or Posix depending on what system we're on.
This exports:
- all functions from posix, nt,
dos,
os2, mac, or ce, e.g. unlink, stat, etc.
- os.path is one of the modules posixpath, ntpath,
macpath, or dos
path
- os.name is 'posix', 'nt', '
dos', '
os2', 'mac', 'ce' or 'riscos'
- all functions from posix, nt, os2, mac, or ce, e.g. unlink, stat, etc.
- os.path is one of the modules posixpath, ntpath,
or mac
path
- os.name is 'posix', 'nt', 'os2', 'mac', '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 '\\')
...
...
@@ -74,24 +74,6 @@ elif 'nt' in _names:
__all__
.
extend
(
_get_exports_list
(
nt
))
del
nt
elif
'dos'
in
_names
:
name
=
'dos'
linesep
=
'
\
r
\
n
'
curdir
=
'.'
;
pardir
=
'..'
;
sep
=
'
\
\
'
;
pathsep
=
';'
defpath
=
'.;C:
\
\
bin'
from
dos
import
*
try
:
from
dos
import
_exit
except
ImportError
:
pass
import
dospath
path
=
dospath
del
dospath
import
dos
__all__
.
extend
(
_get_exports_list
(
dos
))
del
dos
elif
'os2'
in
_names
:
name
=
'os2'
linesep
=
'
\
r
\
n
'
...
...
@@ -365,17 +347,17 @@ else:
import
UserDict
# Fake unsetenv() for Windows
# not sure about os2
and dos
here but
# not sure about os2 here but
# I'm guessing they are the same.
if
name
in
(
'os2'
,
'nt'
,
'dos'
):
if
name
in
(
'os2'
,
'nt'
):
def
unsetenv
(
key
):
putenv
(
key
,
""
)
if
name
==
"riscos"
:
# On RISC OS, all env access goes through getenv and putenv
from
riscosenviron
import
_Environ
elif
name
in
(
'os2'
,
'nt'
,
'dos'
):
# Where Env Var Names Must Be UPPERCASE
elif
name
in
(
'os2'
,
'nt'
):
# Where Env Var Names Must Be UPPERCASE
# But we store them as upper case
class
_Environ
(
UserDict
.
IterableUserDict
):
def
__init__
(
self
,
environ
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment