diff options
author | Guido van Rossum <guido@python.org> | 1992-03-31 19:07:25 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-31 19:07:25 (GMT) |
commit | aa257d90da11b4f9d8d3fe8588bbab3b2499ae93 (patch) | |
tree | 4d6bb2b4e82266890c5b0c37b6709d6c5537ea3b /Lib/stdwin | |
parent | bf1710ac5ffc8c38d7b0afd51db4c1ae26673676 (diff) | |
download | cpython-aa257d90da11b4f9d8d3fe8588bbab3b2499ae93.zip cpython-aa257d90da11b4f9d8d3fe8588bbab3b2499ae93.tar.gz cpython-aa257d90da11b4f9d8d3fe8588bbab3b2499ae93.tar.bz2 |
use os and os.path
Diffstat (limited to 'Lib/stdwin')
-rwxr-xr-x | Lib/stdwin/DirList.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Lib/stdwin/DirList.py b/Lib/stdwin/DirList.py index 0066c58..00e9a8c 100755 --- a/Lib/stdwin/DirList.py +++ b/Lib/stdwin/DirList.py @@ -2,14 +2,7 @@ # XXX Displays messy paths when following '..' -try: - import posix, path - os = posix -except ImportError: - import mac, macpath - os = mac - path = macpath - +import os import stdwin, rect from stdwinevents import * from Buttons import PushButton @@ -22,8 +15,8 @@ class DirList(VSplit): self = VSplit.create(self, parent) names = os.listdir(dirname) for name in names: - if path.isdir(path.join(dirname, name)): - fullname = path.join(dirname, name) + if os.path.isdir(os.path.join(dirname, name)): + fullname = os.path.join(dirname, name) btn = SubdirButton().definetext(self, fullname) elif name[-3:] == '.py': btn = ModuleButton().definetext(self, name) |